comp.lang.ada
 help / color / mirror / Atom feed
From: joseph_kwan@greenlime.com (Joseph Kwan)
Subject: How to convert record?
Date: 21 Oct 2001 02:56:25 -0700
Date: 2001-10-21T09:56:25+00:00	[thread overview]
Message-ID: <80d2e34.0110210156.7918cd3d@posting.google.com> (raw)

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.



             reply	other threads:[~2001-10-21  9:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-21  9:56 Joseph Kwan [this message]
2001-10-22 11:30 ` How to convert record? John McCabe
2001-10-25 11:40   ` Joseph Kwan
2001-10-25 12:38     ` sk
2001-10-25 17:12       ` Jeffrey L. Susanj
2001-10-25 12:48     ` David C. Hoos
2001-10-29  1:42       ` Joseph Kwan
2001-10-29 13:35         ` Marc A. Criley
2001-10-25 12:48     ` Marc A. Criley
2001-10-25 12:54       ` sk
2001-10-25 15:41         ` Ted Dennison
2001-10-26  3:21           ` Smark
2001-10-26  5:45             ` James Rogers
2001-10-26 17:46               ` Smark
2001-10-26 14:30             ` Ted Dennison
2001-10-26 17:42               ` Smark
2001-10-26 20:02                 ` Ted Dennison
2001-10-26 23:10             ` Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2001-10-29 18:16 Beard, Frank
2001-10-30  1:17 ` Adrian Hoe
2001-10-30 19:05 Beard, Frank
2001-10-31  4:10 ` Adrian Hoe
2001-10-31 19:40 Beard, Frank
2001-11-01  2:13 ` Adrian Hoe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox