From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: Endianness independance
Date: 05 Mar 2003 12:37:13 -0500
Date: 2003-03-05T17:51:13+00:00 [thread overview]
Message-ID: <uy93tpvee.fsf@nasa.gov> (raw)
In-Reply-To: 3E655DF5.5020702@acm.org
Jeffrey Carter <jrcarter@acm.org> writes:
> Stephen Leake wrote:
> > Jeffrey Carter <jrcarter@acm.org> writes:
> >
> >>You can make this system independent by using
> >>System.Default_Bit_Order, which, thanks to an AI (I don't remember
> >>which, but you can look it up) is static.
> > What do you mean by "system independent"? This code is already
> > portable without change across targets that differ in endianness;
> > that's whay I mean by "system independent".
> > Exactly how would I use System.Default_Bit_Order for this purpose?
> > I can check that System.Default_Bit_Order has a particular value, and
> > only provide a rep clause that is correct for that value. But I don't
> > see how to use System.Default_Bit_Order in the rep clause; it does not
> > provide enough information.
>
> You said your package was "system dependent" because you have to
> change it for different platforms.
Hmm. Maybe you mean the SAL.Endianness package (I posted two packages;
SAL.Endianness and Foo - please be specific!). Yes, that has to be
different for different platforms. But, you only have to write it once
for each platform, and I already have. So I don't have to edit code
when I change platforms; I just have to change which code is included
in the compilation.
> Using Default_Bit_Order you can make it work without change on all
> platforms. You can use 'Pos of Default_Bit_Order to calculate all of
> the named numbers in your package. You can then continue to use your
> package as before, but without changing it when you change
> platforms.
Well, maybe. I'm comfortable with the package as it is. If you'd like
to contribute, feel free to post your version :).
--
-- Stephe
next prev parent reply other threads:[~2003-03-05 17:37 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-28 15:11 Endianness independance Lionel.DRAGHI
2003-02-28 16:10 ` Stephen Leake
2003-02-28 18:26 ` Marin David Condic
2003-03-01 10:48 ` Amir Yantimirov
2003-03-01 12:00 ` Simon Wright
2003-03-01 12:53 ` Jeffrey Creem
2003-03-01 17:26 ` Simon Wright
2003-03-01 12:47 ` Marin David Condic
2003-03-02 9:49 ` Amir Yantimirov
2003-03-03 13:29 ` Marin David Condic
2003-03-03 16:05 ` Stephen Leake
2003-03-03 17:50 ` Marin David Condic
2003-03-04 2:33 ` Jeffrey Carter
2003-03-04 17:50 ` Stephen Leake
2003-03-05 2:15 ` Jeffrey Carter
2003-03-05 17:37 ` Stephen Leake [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-02-28 17:21 Lionel.DRAGHI
2003-02-28 20:37 ` Randy Brukardt
2003-03-03 13:33 Lionel.DRAGHI
2003-03-03 16:11 ` Stephen Leake
2003-03-03 17:52 Lionel.DRAGHI
2003-03-03 20:29 ` Pascal Obry
[not found] <BB06F6B19AC7D51181D10050DA725A10138C71@eoleclb.clb.tcfr.thales>
2003-03-03 18:38 ` David C. Hoos
2003-03-04 11:34 Lionel.DRAGHI
[not found] <BB06F6B19AC7D51181D10050DA725A10138C75@eoleclb.clb.tcfr.thales>
2003-03-04 12:46 ` David C. Hoos, Sr.
2003-03-04 16:38 ` John Harbaugh
2003-03-04 21:25 ` Simon Wright
2003-03-05 17:28 ` Warren W. Gay VE3WWG
2003-03-05 20:15 ` Simon Wright
2003-03-05 21:54 ` Warren W. Gay VE3WWG
2003-03-05 17:49 David C. Hoos
2003-03-05 20:16 ` Simon Wright
2003-03-05 21:58 ` Warren W. Gay VE3WWG
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox