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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,febd9e55846c9556 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-04 18:16:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news.infoave.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3E655DF5.5020702@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Endianness independance References: <5115eb96.0303010248.1b2b8d37@posting.google.com> <3E641073.8030600@acm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 05 Mar 2003 02:15:00 GMT NNTP-Posting-Host: 63.184.8.195 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1046830500 63.184.8.195 (Tue, 04 Mar 2003 18:15:00 PST) NNTP-Posting-Date: Tue, 04 Mar 2003 18:15:00 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:34883 Date: 2003-03-05T02:15:00+00:00 List-Id: Stephen Leake wrote: > Jeffrey Carter writes: > >>You can make this system independent by using >>System.Default_Bit_Order, which, thanks to an AI (I don't remember >>which, but you can look it up) is static. > > What do you mean by "system independent"? This code is already > portable without change across targets that differ in endianness; > that's whay I mean by "system independent". > > Exactly how would I use System.Default_Bit_Order for this purpose? > > I can check that System.Default_Bit_Order has a particular value, and > only provide a rep clause that is correct for that value. But I don't > see how to use System.Default_Bit_Order in the rep clause; it does not > provide enough information. You said your package was "system dependent" because you have to change it for different platforms. Using Default_Bit_Order you can make it work without change on all platforms. You can use 'Pos of Default_Bit_Order to calculate all of the named numbers in your package. You can then continue to use your package as before, but without changing it when you change platforms. -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail