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
> 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
.



Relevant Pages

  • Re: BSOD error enclosed-- Dimension 2350
    ... > Could someone please guide me towards a fix perhaps? ... > Error Message and Specs below..... ...
    (alt.sys.pc-clone.dell)
  • Re: Shuttle damage overkill
    ... The gap filler is out more than is allowed by specs. ... for them to ignore it when they can possibly fix it AND demonstrate the ... Prev by Date: ...
    (sci.space.policy)
  • XP wont let me log in
    ... I have been asked to fix a computer for a friend and I am stumped. ... the specs for the machine ... HP laptop model # N5310 ...
    (microsoft.public.windowsxp.general)
  • slow scrolling in windows
    ... have you gotten the latest drivers? ... i know one possible fix is to right click the desktop> ... give that a shot. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Shuttle damage overkill
    ... > The gap filler is out more than is allowed by specs. ... > for them to ignore it when they can possibly fix it AND demonstrate the ... risk gets amplified a thousand-fold by the media. ...
    (sci.space.policy)