comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: GNAT Opinions
Date: 1998/12/25
Date: 1998-12-25T00:00:00+00:00	[thread overview]
Message-ID: <760d41$p6r$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 75tr9e$3h8$1@remarQ.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.

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1998-12-25  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 [this message]
1998-12-27  0:00       ` endian-independent rep clauses (was Re: GNAT Opinions) Pat Rogers
1998-12-28  0:00         ` 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