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 05:58:59 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <3FF57910.60406@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Enumeration representation References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 02 Jan 2004 13:58:59 GMT NNTP-Posting-Host: 165.247.65.220 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.atl.earthlink.net 1073051939 165.247.65.220 (Fri, 02 Jan 2004 05:58:59 PST) NNTP-Posting-Date: Fri, 02 Jan 2004 05:58:59 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:4041 Date: 2004-01-02T13:58:59+00:00 List-Id: We used to slap that on Ada83 code just to be sure we got what we wanted (usually because it was being communicated externally in some way). I don't think we ever encountered a compiler where the representation was otherwise, but because the standard didn't dictate that it was so, we played safe. Now that we're using Ada95, it is (as you observe) from the Department Of Redundancy Department and completely unnecessary. However, Our tools still generate this kind of code and old programmer's habbits die hard. People still do it. I wonder if it causes any harm by way of inefficiency in some respect? MDC Robert A Duff wrote: > > 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. > > And of course the position numbers always start at 0, no matter what > the representation is. > > - Bob -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "Face it ladies, its not the dress that makes you look fat. Its the FAT that makes you look fat." -- Al Bundy ======================================================================