comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
Subject: Re: Using GNAT.Sockets with Streams and Byte Swapping
Date: 26 May 2005 20:51:31 +0200
Date: 2005-05-26T20:51:34+02:00	[thread overview]
Message-ID: <ull61keh8.fsf@obry.net> (raw)
In-Reply-To: 1117107317.975801.33390@f14g2000cwb.googlegroups.com


"markp" <markwork66@yahoo.com> writes:

> We found the answer to our problem. We have types such as
> 
> type x is range 1..5;
> 
> We then make records including these types. In the rep specs, we define
> them to be 32 bits. Apparently, GNAT ignores the rep spec when doing
> the 'Write, so we are not sending the correct number of bits. The fix
> is:

This can be solved with the new Ada 2006 Stream_Size attribute.

http://www.adaic.com/standards/rm-amend/html/RM-13-13-2.html

Pascal.


-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  reply	other threads:[~2005-05-26 18:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25  9:48 Using GNAT.Sockets with Streams and Byte Swapping markp
2005-05-26  6:00 ` Simon Wright
2005-05-26  9:28   ` markp
2005-05-26  9:50     ` Alex R. Mosteo
2005-05-26 10:01     ` Duncan Sands
2005-05-26 11:35       ` markp
2005-05-26 18:51         ` Pascal Obry [this message]
2005-05-26 20:29         ` Simon Wright
2005-05-26 21:02           ` Florian Weimer
2005-05-27  6:38             ` Vinzent 'Gadget' Hoefler
replies disabled

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