comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Enumeration representation
Date: Fri, 2 Jan 2004 14:52:03 -0600
Date: 2004-01-02T14:52:03-06:00	[thread overview]
Message-ID: <vvbmhki6uvir64@corp.supernews.com> (raw)
In-Reply-To: wcchdzf6p9b.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wcchdzf6p9b.fsf@shell01.TheWorld.com...
> "Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk>
writes:
>
> > Am I correct in saying that enumerations don't necessarily begin at
zero?
> > Is this implementation dependent?
>
> RM-13.4(8) *requires* the internal codes to be 0, 1, 2...
> if no representation clause is given.
> So there's never a need to say "for Enum_Type use (0, 1, 2, 3);" --
> that's the default.  It is not implementation dependent.

Note that that is only true of Ada 95; Ada 83 didn't specify anything. So,
if you care and you have to be compatible with Ada 83, you do need to give
the rep. clause. (But that combination ought to be very rare.)

                 Randy.






  parent reply	other threads:[~2004-01-02 20:52 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 20:44 Enumeration representation Luke A. Guest
2004-01-01 21:45 ` Stephen Leake
2004-01-01 22:01   ` Luke A. Guest
2004-01-02  1:17     ` tmoran
2004-01-02  1:29     ` Stephen Leake
2004-01-02  3:10       ` Luke A. Guest
2004-01-02  2:46 ` Robert A Duff
2004-01-02  3:12   ` Luke A. Guest
2004-01-02 13:58   ` Marin David Condic
2004-01-02 21:39     ` Pat Rogers
2004-01-03 13:42       ` Marin David Condic
2004-01-03  1:53     ` Robert A Duff
2004-01-02 20:52   ` Randy Brukardt [this message]
2004-01-02 21:05     ` Luke A. Guest
  -- strict thread matches above, loose matches on Subject: below --
1999-09-10  0:00 Alex
1999-09-10  0:00 ` Keith Thompson
1999-09-11  0:00   ` Robert Dewar
1999-09-11  0:00     ` Keith Thompson
1999-09-12  0:00       ` Bryce Bardin
1999-09-13  0:00         ` Robert Dewar
1999-09-13  0:00           ` Keith Thompson
1999-09-13  0:00       ` Robert Dewar
1999-09-12  0:00         ` Keith Thompson
1999-09-13  0:00           ` Robert Dewar
1999-09-13  0:00             ` Keith Thompson
1999-09-14  0:00               ` Robert Dewar
1999-09-13  0:00             ` Ted Dennison
1999-09-13  0:00         ` Robert A Duff
1999-09-13  0:00           ` Robert Dewar
1999-09-10  0:00 ` Ted Dennison
1999-09-10  0:00   ` Robert Dewar
1999-09-13  0:00     ` Ted Dennison
1999-09-10  0:00 ` David C. Hoos, Sr.
1999-09-10  0:00   ` Robert Dewar
1999-09-10  0:00 ` Matthew Heaney
1999-09-10  0:00   ` Robert Dewar
1999-09-13  0:00 ` Alex
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox