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 22:55:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3C831A51.85BD274@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Converting Char to Enum References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 04 Mar 2002 06:55:24 GMT NNTP-Posting-Host: 209.86.211.218 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1015224924 209.86.211.218 (Sun, 03 Mar 2002 22:55:24 PST) NNTP-Posting-Date: Sun, 03 Mar 2002 22:55:24 PST Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sun, 03 Mar 2002 22:55:27 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:20748 Date: 2002-03-04T06:55:24+00:00 List-Id: Lars Noschinski wrote: > > Kilgallen@SpamCop.net (Larry Kilgallen) wrote: > > Lars Noschinski writes: > >> convert : constant array(characters) of symbols := ... > [...] > >> "sym := convert(char)"? > >> > >> In this case, how I catch invalid characters? > > > > Perhaps with one additional symbol named INVALID_CHARACTER. > > Ok, that's a possibility. But I thougt, inband-signalling would be a no- > no? If it makes your code more complex, then avoiding inband signaling is probably the wrong approach. In real life, you would use the extra enumeration value only in the part of the code that interfaces with the outside world. The rest of the software would be restricted to a subtype (Valid_Symbol?) of the enumeration type that excludes this extra value. -- Jeff Carter "Nobody expects the Spanish Inquisition!" Monty Python's Flying Circus