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,64599bfe530783cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-16 09:03:20 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!freenix!proxad.net!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Any examples of Byte Ordering Functions Date: Thu, 16 Oct 2003 14:59:27 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1066243458.911546@master.nyc.kbcfp.com> NNTP-Posting-Host: host81-129-39-127.in-addr.btopenworld.com X-Trace: hercules.btinternet.com 1066316367 10922 81.129.39.127 (16 Oct 2003 14:59:27 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Thu, 16 Oct 2003 14:59:27 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MSMail-Priority: Normal X-Priority: 3 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:993 Date: 2003-10-16T14:59:27+00:00 List-Id: "James Rogers" wrote in message > To quote from the Ada Language Reference Manual section 13.5: > > For every specific record subtype S, the following attribute is defined: > > S'Bit_Order Denotes the bit ordering for the type of S. The value of this [snip] This has nothing to do with the underlying byte-endianness as the OP needs but to do with record representation clauses mean. It's this sort of thing that really puts me off using record reps - I usually just use a toolkit of generic routines that I instantiate for each type and build to.from arrays of Unsigned_32. You could write your own functions to do this - it is trivial, esp if you are dealing with the predefined type Unsigned_32. Or pragma Import the 'C' routines (yuck!).