comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Using GNAT.Sockets with Streams and Byte Swapping
Date: Thu, 26 May 2005 21:29:12 +0100
Date: 2005-05-26T21:29:12+01:00	[thread overview]
Message-ID: <m2sm09u3xj.fsf@grendel.local> (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

The rep spec is about layout in memory, not on the stream.

> is:
>
> type x is range 1..5;
> for x'size use 32;
>
> This fixes our problem.
>
> Thanks very much for your help.

You're welcome (and I'm glad it didn't turn out to be so difficult
after all!)



  parent reply	other threads:[~2005-05-26 20:29 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
2005-05-26 20:29         ` Simon Wright [this message]
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