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=2.1 required=5.0 tests=BAYES_20,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Florian Weimer Subject: Re: Case Sensitivity Date: 2000/05/11 Message-ID: <87zopxt25e.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 622196685 References: <958056490.47876@hearts.q-net.net.au> Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 958066909 514 192.168.1.2 (11 May 2000 17:41:49 GMT) Organization: Penguin on board User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 Mime-Version: 1.0 Reply-To: Florian Weimer NNTP-Posting-Date: 11 May 2000 17:41:49 GMT Newsgroups: comp.lang.ada Date: 2000-05-11T17:41:49+00:00 List-Id: "Cameron McShane" writes: > We need a menu that needs to be case-'in'sensitive. I am using an enumerated > data type for the 3 menu options ie: > > type Menu_Options is (buy, read, done) > > 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 > > or is there a way of converting user input to all lower case? If you use Menu_Options'Value to convert a string to the corresponding enumeration value, you don't have to care about case at all. Or am I missing something?