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: 103376,227757d168eaa8a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 06 Dec 2004 13:57:42 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <41b3291e$0$44072$5fc3050@dreader2.news.tiscali.nl> Subject: Re: A question re meaning/use of the "for ... use ..." Date: Mon, 6 Dec 2004 13:59:00 -0600 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 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-Q1lE2+Mn28WYH5gbJM29Q98C3nlGB8uFFl75SxiwFcxzIwLuh7PLbLDrtsxVHfbt2XPptdvojElstSp!D1nJ1tZhzj1R9WJjblMatPnDL/5iWgReYIlOMmhJVcpDxTijgZ/sn0mM1CfML1Qqd9KOhDc+cSoj X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.20 Xref: g2news1.google.com comp.lang.ada:6810 Date: 2004-12-06T13:59:00-06:00 List-Id: "Jeffrey Carter" wrote in message news:H1Hsd.1987$yr1.256@newsread3.news.pas.earthlink.net... > Stephen Leake wrote: > > > There is no standard attribute that returns the internal > > representation specified by the enumeration representation clause. > > However, GNAT provides the non-standard 'Enum_Rep for this purpose. > > I have no problem with 'Pos returning the abstract position number, but > do think something like GNAT's 'Enum_Rep should be standard, along with > a conversion the other way, equivalent to 'Val ('Enum_Val?). The ARG discussed this long ago, and concluded that such a facility isn't needed. That's because Unchecked_Conversion provides the needed support. Indeed, this is one of the few cases where the result of Unchecked_Conversion is defined by the language (using it in this way will work on all Ada compilers). There was some discussion about syntax guides that prohibit the use of Unchecked_Conversion, but there is a lot of discomfort about changing the language just because some people's style guides are broken... Randy.