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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0d68c502c0ae6 X-Google-Attributes: gid103376,public From: David Starner Subject: Re: Printing Enum Variable Re: Linux World Date: 1999/03/03 Message-ID: <36DDA761.7B4E8099@aasaa.ofe.org>#1/1 X-Deja-AN: 450906783 Content-Transfer-Encoding: 7bit References: <7bfc2n$jl9@dfw-ixnews5.ix.netcom.com> <7bhh26$r7c$1@remarQ.com> <36DCAC1F.430E2C5E@aasaa.ofe.org> <7bk4v8$kl8$1@remarQ.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: SLUG Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-03T00:00:00+00:00 List-Id: fraser@synopsys.ha.com wrote: > > I nearly cried when dstarner98@aasaa.ofe.org said: > > [ printing enumerations in C example deleted ...] > > The point being, of course, that in Ada I write: > > Bob'Image (X) > > which still works even if I add an apricot. Which solution do you prefer? Mine. For my example printed out "Red apple" as opposed to "RED_APPLE", and could be quickly internationalized. The only way to internationalize Bob'Image (X) is to rip it out and replace all examples with something like the code you cut. I don't think direct outputing of enumerations is right except as a quick and dirty hack - the name mangling require by C or Ada (no spaces, no hypens, etc.) combined with the i18n problems make it inappropriate. I never meant this as an attack on Ada. It just that complaining about C for lack of enumeration strings is as appropriate as complaining about Ada for lack of a "?:" operator. It's not that big a deal. -- David Starner - OSU student - dstarner98@aasaa.ofe.org If you want a real optimist, look up Ray Bradbury. Guy's nuts. He actually likes people. -David Brin