From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79db4ff72bff9422,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-21 02:56:26 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: joseph_kwan@greenlime.com (Joseph Kwan) Newsgroups: comp.lang.ada Subject: How to convert record? Date: 21 Oct 2001 02:56:25 -0700 Organization: http://groups.google.com/ Message-ID: <80d2e34.0110210156.7918cd3d@posting.google.com> NNTP-Posting-Host: 210.186.172.66 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1003658185 16162 127.0.0.1 (21 Oct 2001 09:56:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 21 Oct 2001 09:56:25 GMT Xref: archiver1.google.com comp.lang.ada:14988 Date: 2001-10-21T09:56:25+00:00 List-Id: Hello, I just started to learn Ada and have been playing/working with Ada for two weeks now. I want to send a command buffer to serial port using florist's POSIX interface but I have encountered problems in converting record to POSIX.IO.IO_Buffer or Ada.Streams.Stream_Element_Array. How can I overcome this problem? package ABCD is type Command is record A : Character; B : Character; C : Integer; D : Long_Integer; end record; -- total 8 bytes; ... end ABCD; POSIX.IO.write (File_Descriptor, Command, Length); where procedure Write (File : in File_Descriptor; Buffer : in IO_Buffer; Last : out POSIX.IO_Count; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); I have searched the CLA but do not find any solutions. Can you please help? Thank you.