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,8623fab5750cd6aa X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!news.jgaa.com!news.hacking.dk!pnx.dk!munin.nbi.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Enum'Image (Was: Improving Ada's image) Date: 21 Jun 2004 17:30:19 +0200 Organization: Munin Sender: sparre@sparre.crs4.it Message-ID: References: <40b9c99e$0$268$edfadb0f@dread16.news.tele.dk> <8xlxc.27603$sS2.845496@news20.bellglobal.com> <1086715817.122983@master.nyc.kbcfp.com> <1086733411.736049@master.nyc.kbcfp.com> <40C85035.4020706@noplace.com> <40C9EC3B.60304@noplace.com> <40CD90A4.8030005@noplace.com> <40CEDCB5.9000509@noplace.com> <1087325485.307616@master.nyc.kbcfp.com> <1087488758.881520@master.nyc.kbcfp.com> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: munin.nbi.dk 1087831819 5566 156.148.70.170 (21 Jun 2004 15:30:19 GMT) X-Complaints-To: sparre@munin.nbi.dk NNTP-Posting-Date: Mon, 21 Jun 2004 15:30:19 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:1742 Date: 2004-06-21T17:30:19+02:00 List-Id: Adrian Wrigley wrote: > Robert I. Eachus wrote: > > I do think it is a shame though that Ada returns the upper case > > version of the name, not the spelling used to declare the type... > > I strongly agree with this view! I am not sure I support it. But there is definitely a point. > Is it not possible to do *something* about this irksome (if minor) > feature for the upcoming 200Y compilers. Maybe a Representation > clause? That would probably be the best way to do it. It would keep old programs working, and it seems like a logical Ada-like way of doing things. type Colours is (Red, Green, Blue); for Red'Image use "R"; for Green'Image use "G"; for Blue'Image use "B"; > Would the incompatibility be unnacceptable (to 200Y) simply to state > that the case of Enum'Image is exactly as in the declaration. I think it would. Jacob -- "It is very easy to get ridiculously confused about the tenses of time travel, but most things can be resolved by a sufficiently large ego."