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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4eb39f748fcf3a97 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: GNAT Opinions Date: 1998/12/25 Message-ID: <760d41$p6r$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 425733354 References: <75rj7i$2cq$1@nnrp1.dejanews.com> <75rvnq$h75@dfw-ixnews10.ix.netcom.com> <75tr9e$3h8$1@remarQ.com> X-Http-Proxy: 1.0 x5.dejanews.com:80 (Squid/1.1.22) for client 166.72.70.173 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Dec 25 16:05:21 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1998-12-25T00:00:00+00:00 List-Id: In article <75tr9e$3h8$1@remarQ.com>, "Pat Rogers" wrote: > Since you mentioned it, endian-independent representation > clauses > can be written (although they are not easy to read, but > then, they > never require changes due to endianess). Norm Cohen > wrote about how > to do it in Ada Letters. I have a free package to > support it, with > a demo program, at my web site: This approach solves only a limited part of the problem that people would like to solve. There are many variations of this problem that occur in actual practice, Consider one of the most fundamental, which is that you have an external data stream that produces a big endian integer as four consecutive bytes in big-endian order. There is no magic rep clause to cause a compiler on a little-endian machine to acquire this data "correctly". Indeed the difficulty may vary from machine to machine, on some machines a quite long and tedious sequence of instructions may be required to reassemble the data. Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own