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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c30b74e0aa9cd004 X-Google-Attributes: gid103376,public From: "Ken Garlington" Subject: Re: Character Handling Date: 2000/04/30 Message-ID: #1/1 X-Deja-AN: 617551746 References: <390D1159.83CAEA7F@cantech.net.au> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 957115944 216.215.77.182 (Sun, 30 Apr 2000 12:32:24 CDT) Organization: FlashNet Communications, http://www.flash.net X-MSMail-Priority: Normal NNTP-Posting-Date: Sun, 30 Apr 2000 12:32:24 CDT Newsgroups: comp.lang.ada Date: 2000-04-30T00:00:00+00:00 List-Id: "Robert Stephen Breen" wrote in message news:390D1159.83CAEA7F@cantech.net.au... > Hi everyone, > I am currently working on an assigment at uni and I have to convert a > String input to upper case. I have discovered that package > Characters.Handling will do the trick, however mebe its because I am > Irish, but I can not make heads or tails of how you actually use it in > your code! > > I have put > > With Text_io,Ada.Characters.Handling; > Use Text_io; > > and in one of my procedures I have tried to convert an input. > > Ada.Characters.Handling.To_upper(Clients_Name(Name_Last)) etc > > all I get is a message stating Ivalid parameter call ? How > > could someone please explain!!!!!!!!!!!!!!!!! > > Thanks > Rob > OK: According to the language manual, section A.3.2, there are two such functions: function To_Upper (Item : in Character) return Character; function To_Upper (Item : in String) return String; So: 1. If Clients_Name(Name_Last) is a neither a character nor a string (e.g. an access value), then it is invalid regardless of the context. 2. If Clients_Name(Name_Last) is a character, then you should be using To_Upper in a context where it should be returning a character. 3. If Clients_Name(Name_Last) is a string, then you should be using To_Upper in a context where it should be returning a string.