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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bac902cf9fd6564b X-Google-Attributes: gid103376,public From: Gautier Subject: Re: Case Sensitivity Date: 2000/05/11 Message-ID: <391AD652.BF1B28D7@maths.unine.ch>#1/1 X-Deja-AN: 622153268 Content-Transfer-Encoding: 7bit References: <958056490.47876@hearts.q-net.net.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 11 May 2000 17:48:36 +0100, mac13-32.unine.ch Organization: Maths - Uni =?iso-8859-1?Q?Neuch=E2tel?= MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-11T00:00:00+00:00 List-Id: Cameron McShane: > If the user is to be allowed to enter Buy or BUY or bUy - etc, do I need to > make the data type > type Menu_Options is (buy, Buy, bUY, etc Wow: 2^n cases for one option worded with n letters! BTW, try it: you might discover that Ada -fortunately- is case insensitive... > or is there a way of converting user input to all lower case? Yes! Check for a To_Lower function in some Ada.* package. BTW, the To_Upper will be more useful to compare with "BUY" "READ" "DONE" returned by the function Menu_Options'Image( option ). Or better: Menu_Options'Value( a_string ) will return a value of Menu_Options type, and is case already insensitive :-) ! HTH ______________________________________________________ Gautier -- http://members.xoom.com/gdemont/gsoft.htm