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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,33ce43bfeafb2681 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder2.news.weretis.net!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Concatenate enumeration Date: Mon, 23 Nov 2009 12:14:27 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: NNTP-Posting-Host: 0ff4ab3cf46b9197c04f952cd9b37277 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 89107393ee841dc8faf1eeacb9876754 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-Validate-Post: http://news.tornevall.net/validate.php?trace=89107393ee841dc8faf1eeacb9876754 X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news1.google.com comp.lang.ada:8218 Date: 2009-11-23T12:14:27-07:00 List-Id: Pablo wrote: > type Enumerate_Type is > ( > NONE, > READY > ); > for Enumerate_Type use > ( > NONE => 0, > READY=> 1 > ); > for Enumerate_Type'Size use 1; > > and I want to create a new type Enumerate2_Type which could be the > form > type Enumerate_Type is > ( > NONE, > READY, > OFF > ); > for Enumerate_Type use > ( > NONE => 0, > READY=> 1, > OFF => 2 > ); > for Enumerate_Type'Size use 2; > > How to I do this without having to explicit clone the first one? You can't. Enumeration types are not extensible. You can do something similar in the reverse direction: type Big is (None, Ready, Off); subtype Small is Big range None .. Ready; or type Small is new Big range None .. Ready; -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail 09