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,b1a96e8174ef9f99 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-10 10:25:57 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!teaser.fr!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Beard, Frank Randolph CIV" Newsgroups: comp.lang.ada Subject: RE: Need Value of enum type not position. Date: Mon, 10 Nov 2003 13:25:09 -0500 Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1068488753 50054 80.67.180.195 (10 Nov 2003 18:25:53 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 10 Nov 2003 18:25:53 +0000 (UTC) To: Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Content-Class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Need Value of enum type not position. Thread-Index: AcOntXgnvflfNZgYToKoR80tHPtZxwAAgJOg X-OriginalArrivalTime: 10 Nov 2003 18:25:09.0623 (UTC) FILETIME=[F9148070:01C3A7B7] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:2315 Date: 2003-11-10T13:25:09-05:00 I like that one even better, because it's even shorter and clearer. Define the range of the numbers you want, let the compiler figure out what it thinks is the best number of bits to use, and then make the enumerated type match it. Frank -----Original Message----- From: Marius Amado Alves [mailto:amado.alves@netcabo.pt] For what it's worth, this exact problem was discussed and solved in the thread "accesing internal codes used for an enumeration" by myself on 7 May 2001. http://groups.google.pt/groups?hl=3Dpt-PT&lr=3D&ie=3DUTF-8&oe=3DUTF-8&fra= me=3Dright&th=3Dd1367eec61426d33&seekm=3Dmailman.989261706.30667.comp.lan= g.ada%40ada.eu.org#link7