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,FREEMAIL_FROM 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!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "markp" Newsgroups: comp.lang.ada Subject: Re: Using GNAT.Sockets with Streams and Byte Swapping Date: 26 May 2005 04:35:18 -0700 Organization: http://groups.google.com Message-ID: <1117107317.975801.33390@f14g2000cwb.googlegroups.com> References: <1117014486.871500.288200@g44g2000cwa.googlegroups.com> <1117099711.738704.120930@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: 208.20.220.72 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1117107322 28215 127.0.0.1 (26 May 2005 11:35:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 May 2005 11:35:22 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=208.20.220.72; posting-account=_Inhcg0AAAAPC2BsuUqoGG-atarvM4_J Xref: g2news1.google.com comp.lang.ada:11163 Date: 2005-05-26T04:35:18-07:00 List-Id: 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.