From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,19b0bf5b6906d2e7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!proxad.net!freenix!oleane.net!oleane!rain.fr!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: Using GNAT.Sockets with Streams and Byte Swapping References: <1117014486.871500.288200@g44g2000cwa.googlegroups.com> <1117099711.738704.120930@g47g2000cwa.googlegroups.com> <1117107317.975801.33390@f14g2000cwb.googlegroups.com> From: Pascal Obry Date: 26 May 2005 20:51:31 +0200 Message-ID: Organization: Home - http://www.obry.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 26 May 2005 20:51:34 CEST NNTP-Posting-Host: 82.120.24.81 X-Trace: 1117133494 news.wanadoo.fr 31774 82.120.24.81:2628 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:11171 Date: 2005-05-26T20:51:34+02:00 List-Id: "markp" 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