comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert C. Leif, Ph.D." <rleif@rleif.com>
To: "Randy Brukardt" <Randy@RRSoftware.Com>,
	"Comp. Lang. Ada" <comp.lang.ada@ada.eu.org>
Subject: RE: [Ada-Comment] Extensible Enumerated Types
Date: Wed, 14 Feb 2001 13:34:28 -0800
Date: 2001-02-14T13:34:28-08:00	[thread overview]
Message-ID: <mailman.982186584.15072.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <006c01c096af$a722e8e0$0304a8c0@bigboy.rrsoftware.com>

From: Bob Leif
To:Randy Brukardt et al.
Randy, many thanks for solving the mystery. Since this discussion was
originally on Comp.Lang.Ada and others may have been searching for this
text, I have taken the liberty of posting it.
---------------------------------------------------------------
SNIP
I went and looking in a dusty carton in the far corner of the
basement of our office, and looked at all of the old mapping documents.

The proposal disappeared between Mapping 2.0 (May 1991) and Mapping 3.0
(June 1991). These versions probably were internal use only (my copy of
Mapping 2.0 was faxed me from AETECH), so I doubt Dr. Leif could find it
anywhere.

So, here is the complete proposal (so far as I can find) from Mapping 2.0:

3.5.1 Enumeration Types

An enumeration type may be extended as part of a type derivation by
specifying additional enumeration literals. The enumeration literals for the
type include those corresponding to the parent and the new enumeration
literals. For each enumeration literal of the parent, there is a
corresponding literal for the new type (with the corresponding position and
ordering). The position number of the first enumeration literal in the
extension part is one more than the position number of the last enumeration
literal of the parent type.

Examples:

    type Boolean_with_Unknown is new Boolean with (Unknown);
       -- Boolean_with_Unknown has three enumeration literals,
       -- False, True, and Unknown with position numbers 0, 1, and 2.

    type Rainbow is (Red, Orange, Yellow, Green, Blue, Indigo, Violet);
    type Full_Color is new Rainbow with (Brown, Black, White);
	 -- Full_Color is an enumeration type with the literals:
       -- Red, Orange, Yellow, Green, Blue,
       -- Indigo, Violet, Brown, Black, White

SNIP

Anyway, enjoy. :-)

			Randy Brukardt.





       reply	other threads:[~2001-02-14 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <006c01c096af$a722e8e0$0304a8c0@bigboy.rrsoftware.com>
2001-02-14 21:34 ` Robert C. Leif, Ph.D. [this message]
     [not found] <002301c0960d$23ecb2f0$01a2a8c0@carpaccio>
2001-02-14  2:55 ` [Ada-Comment] Extensible Enumerated Types Robert C. Leif, Ph.D.
2001-02-14 12:49   ` Marc A. Criley
2001-02-15 10:13     ` Mario Amado Alves
replies disabled

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