Re: Using GNAT.Sockets with Streams and Byte Swapping



"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!)
.



Relevant Pages

  • Re: Pivot tables
    ... You could spec the columns as another user describes but I found that ... swjtx's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29716 ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: PC graphics vs. Xbox360
    ... ....and the spec of your PC is? ... Not goading you here - would like to hear ... what you're comparing the 360 with. ... Prev by Date: ...
    (comp.sys.ibm.pc.games.action)
  • Re: Is this a compiler bug?
    ... it's strictly according to the spec. ... tinyurl) for the gruesome details. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Highest Voltage IGBT discretes?
    ... >I simply stated the spec on the QIS4506001 because it was one of the ... >few discretes I could find>1200V. ... I was just looking at other options because the lead time is long. ... Prev by Date: ...
    (sci.electronics.design)
  • Toshiba 46HM95
    ... I can't find the spec from Toshiba's web site ... I use Time Warner cable in New York City. ... Prev by Date: ...
    (alt.tv.tech.hdtv)