From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5b0235b23a9db0f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-31 17:22:10 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: Supertypes RE: Extensible Enumerated types Date: Wed, 31 Jan 2001 20:20:33 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 980990522 83354 137.194.161.2 (1 Feb 2001 01:22:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 1 Feb 2001 01:22:02 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:4793 Date: 2001-01-31T20:20:33-05:00 Bob, I like Jeff Creem's idea of: type Fruit_Type is (Apple, Orange); type New_Fruit_Type is new Fruit_Type with (Pear, Kiwi); So your example would be: -- from Package Prefix_Recs type Prefix_Type is (None, Mr, Ms, Miss, Mrs, Dr, Prof, Rev, Other); --From Package Prefix_Recs.Army type Army_Prefix_Type is new Prefix_Type with (Private, Corporal, Sergeant, Lieutenant, Captain, Major, Colonel, General); Wouldn't this serve your purposes without the need of adding a new reserved word? Frank -----Original Message----- From: Robert C. Leif, Ph.D. [mailto:rleif@rleif.com] Sent: Wednesday, January 31, 2001 3:05 AM To: comp.lang.ada@ada.eu.org Subject: Supertypes RE: Extensible Enumerated types > This is suggestion includes the addition of a new keyword to Ada. I realize > that some would consider this rank heresy. > > Since Ada has Subtypes to specify a subset of a type, it would be reasonable > to create a symmetrical operation to create a superset of a type.