From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: endian-independent rep clauses (was Re: GNAT Opinions)
Date: 1998/12/27
Date: 1998-12-27T00:00:00+00:00 [thread overview]
Message-ID: <7667t3$3kj$1@remarQ.com> (raw)
In-Reply-To: 760d41$p6r$1@nnrp1.dejanews.com
dewarr@my-dejanews.com wrote in message
<760d41$p6r$1@nnrp1.dejanews.com>...
>In article <75tr9e$3h8$1@remarQ.com>,
> "Pat Rogers" <progers@NOclasswideSPAM.com> 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
next prev parent reply other threads:[~1998-12-27 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-23 0:00 GNAT Opinions choboy
1998-12-23 0:00 ` Bob
1998-12-24 0:00 ` Pat Rogers
1998-12-25 0:00 ` dewarr
1998-12-27 0:00 ` Pat Rogers [this message]
1998-12-28 0:00 ` endian-independent rep clauses (was Re: GNAT Opinions) dewar
1998-12-26 0:00 ` GNAT Opinions Steven Hovater
1998-12-28 0:00 ` dewar
1999-01-04 0:00 ` Pascal MALAISE
1999-01-07 0:00 ` Michael F Brenner
1999-01-07 0:00 ` dewar
1999-01-07 0:00 ` Steven Hovater
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox