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,bb6ebeb41bf44573 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: character matching Date: 15 Aug 2004 21:02:21 GMT Organization: loris.TV Message-ID: References: <87zn4wtpvi.fsf@insalien.org> NNTP-Posting-Host: ppc201.mipool.uni-jena.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fsuj29.rz.uni-jena.de 1092603741 32379 141.35.13.101 (15 Aug 2004 21:02:21 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 15 Aug 2004 21:02:21 GMT User-Agent: slrn/0.9.8.0 (Linux) Xref: g2news1.google.com comp.lang.ada:2743 Date: 2004-08-15T21:02:21+00:00 List-Id: Ludovic Brenta wrote: > type Category is (Whitespace, Punctuation, Letter, Digit, Other); I support Steve's suggestion. Yours has the advantage of showing how simple things can be done. I guess this is useful for learning purposes but may contain more mistakes than the Annex-A-solution ;) > when others => return Other; > (note that in Ada, a "case" statement is required to process all > possible values of the case_expression (here, C); the compiler will > tell you if you forgot some values, unless as above you use "when > others"). Which is considered BAD because when you change the range of a type your case still works but may misbehave for the new values. Without the "when others"-line the compiler forces you to adapt your routines to the new range. I know you know that, it's just for the original poster (John?). -- mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver Wie kommts das am Ende des Geldes noch soviel Monat �brig ist?