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,37956b356498633 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-03 12:07:28 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Converting Char to Enum Date: 3 Mar 2002 14:07:17 -0600 Organization: LJK Software Message-ID: References: NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1015186040 4850 192.135.80.34 (3 Mar 2002 20:07:20 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sun, 3 Mar 2002 20:07:20 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:20734 Date: 2002-03-03T14:07:17-06:00 List-Id: In article , Lars Noschinski writes: > dewar@gnat.com (Robert Dewar) wrote: >> Ouch! From heavy to heavier! >> An array is clearly the obvious efficient solution here. > > You mean something like > > convert : constant array(characters) of symbols := ... > > sym : symbols; > char : characters; > > and an assignment like > > "sym := convert(char)"? > > In this case, how I catch invalid characters? Perhaps with one additional symbol named INVALID_CHARACTER.