From: bobduff@world.std.com (Robert A Duff)
Subject: Re: GNAT Ada for DOS - Reading Integers Problem
Date: 1996/02/23
Date: 1996-02-23T00:00:00+00:00 [thread overview]
Message-ID: <Dn8JHq.I6u@world.std.com> (raw)
In-Reply-To: 4gfsuq$10f5@watnews1.watson.ibm.com
In article <4gfsuq$10f5@watnews1.watson.ibm.com>,
Norman H. Cohen <ncohen@watson.ibm.com> wrote:
> type Byte_Swapped_Half_Word is new Half_Word;
>
> for Byte_Swapped_Half_Word'Bit_Order use High_Order_First;
>
>causing Byte_Swapped_Half_Word to inherit the literal text
>
> Low at 0 range 0 .. 7;
> High at 0 range 8 .. 15;
>
>from its parent's record representation clause, but to interpret that
>text big-endianly instead of little-endianly!
>(Fortunately, the Founding Fathers follow this newsgroup and can provide
>a definitive answer about their Original Intent.)
Well, *this* Founding Father can't. I have to admit that I never
thought about this particular example.
However, I think that's what the RM says -- you inherit the record rep
clause, but you override the bit order. That seems like the only
reasonable intepretation.
Note that the above is illegal if there are any inherited subprograms
lurking around (which is quite often the case).
- Bob
next prev parent reply other threads:[~1996-02-23 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4g2efj$d5d@susscsc1.rdg.ac.uk>
[not found] ` <tgmDMwoGx.B04@netcom.com>
1996-02-20 0:00 ` GNAT Ada for DOS - Reading Integers Problem Dave Haverkamp
1996-02-20 0:00 ` Norman H. Cohen
1996-02-21 0:00 ` Robert Dewar
1996-02-21 0:00 ` Norman H. Cohen
1996-02-21 0:00 ` Robert Dewar
1996-02-23 0:00 ` Robert A Duff [this message]
1996-02-23 0:00 ` Robert Dewar
[not found] ` <Dn8ItA.B9H@world.std.com>
1996-02-23 0:00 ` Robert Dewar
1996-02-24 0:00 ` Tore Joergensen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox