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,967a201c4428b348 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-02 12:54:12 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!in.100proofnews.com!tdsnet-transit!newspeer.tds.net!sn-xit-02!sn-xit-04!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Enumeration representation Date: Fri, 2 Jan 2004 14:52:03 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:4048 Date: 2004-01-02T14:52:03-06:00 List-Id: "Robert A Duff" wrote in message news:wcchdzf6p9b.fsf@shell01.TheWorld.com... > "Luke A. Guest" writes: > > > Am I correct in saying that enumerations don't necessarily begin at zero? > > Is this implementation dependent? > > RM-13.4(8) *requires* the internal codes to be 0, 1, 2... > if no representation clause is given. > So there's never a need to say "for Enum_Type use (0, 1, 2, 3);" -- > that's the default. It is not implementation dependent. Note that that is only true of Ada 95; Ada 83 didn't specify anything. So, if you care and you have to be compatible with Ada 83, you do need to give the rep. clause. (But that combination ought to be very rare.) Randy.