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-17 05:09:06 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hub.siol.net!newsfeed1.eu.ignite.net!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed3!newreader.ukcore.bt.net!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: Fri, 17 Oct 2003 12:08:44 +0000 (UTC) Organization: BT Openworld Message-ID: References: NNTP-Posting-Host: host81-129-39-127.in-addr.btopenworld.com X-Trace: titan.btinternet.com 1066392524 22192 81.129.39.127 (17 Oct 2003 12:08:44 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Fri, 17 Oct 2003 12:08:44 +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:1067 Date: 2003-10-17T12:08:44+00:00 List-Id: wrote in message news:cNCjb.573899$cF.247166@rwcrnsc53... > >build to.from arrays of Unsigned_32. > > > >You could write your own functions to do this - it is trivial, esp if you > How about raising the abstraction level and using Streams. ie, don't > read something as Unsigned_32, then byte swap (or not). Instead define > a 'Read for objects of the type and two implementation of that 'Read, > one just reading four bytes and the other reading four bytes and swapping. Yes, that sounds good but at the time I was working in an '83 shop, so no streams. Actually, the next time I used them I was working at a place that did have an '95 compiler but prohibited the use of any '95 features! Sad but true...