Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Simon Wright <simon@xxxxxxxxxxxx>
- Date: Thu, 26 May 2005 21:29:12 +0100
"markp" <markwork66@xxxxxxxxx> 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!)
.
- Follow-Ups:
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Florian Weimer
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- References:
- Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Simon Wright
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Duncan Sands
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Using GNAT.Sockets with Streams and Byte Swapping
- Prev by Date: Re: Gnat STORAGE_ERROR
- Next by Date: Re: Using GNAT.Sockets with Streams and Byte Swapping
- Previous by thread: Re: Using GNAT.Sockets with Streams and Byte Swapping
- Next by thread: Re: Using GNAT.Sockets with Streams and Byte Swapping
- Index(es):
Relevant Pages
|