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,c30b74e0aa9cd004 X-Google-Attributes: gid103376,public From: "Marin D. Condic" Subject: Re: Character Handling Date: 2000/04/30 Message-ID: <390C6C3F.90685791@quadruscorp.com>#1/1 X-Deja-AN: 617500671 Content-Transfer-Encoding: 7bit References: <390D1159.83CAEA7F@cantech.net.au> Organization: Quadrus Corporation X-Sender: "Marin D. Condic" (Unverified) X-Server-Date: 30 Apr 2000 14:26:40 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-30T14:26:40+00:00 List-Id: Robert Stephen Breen wrote: > > 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 > You don't have sufficient information here to diagnose the exact problem. The answer is that it depends o what the function (I'm presuming its a function) Clients_Name returns. A correct usage of the call would be: .... String_1 : String (1..10) := "abcdefghik" ; String_2 : String (1..10) ; .... String_2 := Ada.Characters.Handling.To_Upper (String_1) ; .... Note that the sizes and types of both String_1 and String_2 match. Note that they are of the type "String" which is the expected type as an input parameter to the function "To_Upper". Ada is very fussy that all the types match. It may seem like a pain, but this is how Ada can catch otherwise hard to diagnose errors in program logic. If you need additional examples, I've got lots of Ada code on my web page. Look specifically at the code under GNAT_Examples.chop where I have lots of small programs that illustrate basic Ada features. MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "I'd trade it all for just a little more" -- Charles Montgomery Burns, [4F10] ======================================================================