* Re: Enumerations and rep-clauses?
2000-02-28 0:00 ` Tucker Taft
@ 2000-02-28 0:00 ` Steve Folly
0 siblings, 0 replies; 3+ messages in thread
From: Steve Folly @ 2000-02-28 0:00 UTC (permalink / raw)
"Tucker Taft" <stt@averstar.com> wrote, amongst other things, in message
news:38BABF5D.A278EF9A@averstar.com...
> An enumeration representation clause specifies a "type-related" aspect
> of representation, so it is shared by all subtypes. See RM95 13.1(8)
which
> indicates that all rep clauses other than Size and Alignment clauses
> are type-related. (Size and Alignment are subtype-specific.)
> --
> -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
> Technical Director, Distributed IT Solutions (www.averstar.com/tools)
> AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
Got it!
Thanks very much for your help.
--
Regards,
Steve Folly.
http://www.follysplace.demon.co.uk
donationsto:myaccount@mybank.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Enumerations and rep-clauses?
@ 2000-02-28 0:00 Steve Folly
2000-02-28 0:00 ` Tucker Taft
0 siblings, 1 reply; 3+ messages in thread
From: Steve Folly @ 2000-02-28 0:00 UTC (permalink / raw)
Hi,
Given the following Ada95 situation...
type enum is ( a, b, c, d );
for enum use ( a => 12, b => 24, c => 36, d => 48 );
subtype half_enum is enum range a .. b;
Is it guaranteed anywhere that half_enum has the same representation attributes
as enum? (ie. half_enum(a) => 12 and half_enum(b) => 24)
I would hope it did, but I'm having trouble finding the particular LRM
paragraph.
Thanks for your help.
--
Regards,
Steve Folly.
mailto:Steve.Folly@rdel.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Enumerations and rep-clauses?
2000-02-28 0:00 Enumerations and rep-clauses? Steve Folly
@ 2000-02-28 0:00 ` Tucker Taft
2000-02-28 0:00 ` Steve Folly
0 siblings, 1 reply; 3+ messages in thread
From: Tucker Taft @ 2000-02-28 0:00 UTC (permalink / raw)
Steve Folly wrote:
>
> Hi,
>
> Given the following Ada95 situation...
>
> type enum is ( a, b, c, d );
>
> for enum use ( a => 12, b => 24, c => 36, d => 48 );
>
> subtype half_enum is enum range a .. b;
>
> Is it guaranteed anywhere that half_enum has the same representation attributes
> as enum? (ie. half_enum(a) => 12 and half_enum(b) => 24)
Yes.
>
> I would hope it did, but I'm having trouble finding the particular LRM
> paragraph.
An enumeration representation clause specifies a "type-related" aspect
of representation, so it is shared by all subtypes. See RM95 13.1(8) which
indicates that all rep clauses other than Size and Alignment clauses
are type-related. (Size and Alignment are subtype-specific.)
>
> Thanks for your help.
>
> --
> Regards,
> Steve Folly.
> mailto:Steve.Folly@rdel.co.uk
--
-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-02-28 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-28 0:00 Enumerations and rep-clauses? Steve Folly
2000-02-28 0:00 ` Tucker Taft
2000-02-28 0:00 ` Steve Folly
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox