comp.lang.ada
 help / color / mirror / Atom feed
From: "markp" <markwork66@yahoo.com>
Subject: Re: Using GNAT.Sockets with Streams and Byte Swapping
Date: 26 May 2005 04:35:18 -0700
Date: 2005-05-26T04:35:18-07:00	[thread overview]
Message-ID: <1117107317.975801.33390@f14g2000cwb.googlegroups.com> (raw)
In-Reply-To: <mailman.134.1117101989.24457.comp.lang.ada@ada-france.org>

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:

type x is range 1..5;
for x'size use 32;

This fixes our problem.

Thanks very much for your help.




  reply	other threads:[~2005-05-26 11:35 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 [this message]
2005-05-26 18:51         ` Pascal Obry
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