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: "Pat Rogers" Subject: endian-independent rep clauses (was Re: GNAT Opinions) Date: 1998/12/27 Message-ID: <7667t3$3kj$1@remarQ.com>#1/1 X-Deja-AN: 426244846 References: <75rj7i$2cq$1@nnrp1.dejanews.com> <75rvnq$h75@dfw-ixnews10.ix.netcom.com> <75tr9e$3h8$1@remarQ.com> <760d41$p6r$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: newsabuse@remarQ.com X-Trace: 914793187 Y6JRGRJUHDEA6C640C usenet87.supernews.com Organization: Software Arts & Sciences Newsgroups: comp.lang.ada Date: 1998-12-27T00:00:00+00:00 List-Id: dewarr@my-dejanews.com wrote in message <760d41$p6r$1@nnrp1.dejanews.com>... >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. I answer with more than a little trepidation, knowing that you are capable of arguing one side to "victory" only to then switch and argue the other side! :-) Seriously, I would consider the above to be a separate problem, since indeed a record rep clause will not handle it. It does what Norm said it does, and nothing more. --- Pat Rogers Training & Development in: http://www.classwide.com Deadline Schedulability Analysis progers@acm.org Software Fault Tolerance (281)648-3165 Real-Time/OO Languages