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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7dfca01aeef9a8c0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-24 05:24:48 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Larry Hazel Newsgroups: comp.lang.ada Subject: Re: Question about enumeration types Date: Tue, 24 Jul 2001 07:23:25 -0500 Organization: MindSpring Enterprises Message-ID: <3B5D68BD.841221BF@mindspring.com> References: <3B5D5EA5.F20EC9D7@ffi.no> NNTP-Posting-Host: c7.ae.9c.af Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 24 Jul 2001 12:23:07 GMT X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 Xref: archiver1.google.com comp.lang.ada:10505 Date: 2001-07-24T12:23:07+00:00 List-Id: Reinert Korsnes wrote: > > Hi, > > (sorry for somehow repeating a question) > > Given the program as below. Here I did put "E : E1" inside > a record since "E" is also a possible value for the enumeration type E1. > > This is somehow verbose. Is it a more elegant way ? There is no conflict here. You must always reference a record component this way. I think any other way would be less elegant. > I find it boring that extending the range of possible values of > an enumeration type may easily cause conflicts with variable names, > and new variable names may cause conflicts values for enumeration > types. I sometimes would like to have the reserved word "Exit" > as a possible value of an enumeration type.... Am I thinking > somewhat wrong ? At least an Ada compile will tell you about conflicts. You can't use reserved words for anything else. I have also wanted to use Exit at times, but settled for Quit or Stop or some such. Range is another reserved word that would be the best variable name in some cases. You just have to qualify it in some way - Maximum_Range for instance. Larry