comp.lang.ada
 help / color / mirror / Atom feed
From: "Ken Garlington" <Ken.Garlington@computer.org>
Subject: Re: Character Handling
Date: 2000/04/30
Date: 2000-04-30T00:00:00+00:00	[thread overview]
Message-ID: <I6_O4.2914$wb7.259375@news.flash.net> (raw)
In-Reply-To: 390D1159.83CAEA7F@cantech.net.au

"Robert Stephen Breen" <emages@cantech.net.au> 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.







  reply	other threads:[~2000-04-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-30  0:00 Character Handling Robert Stephen Breen
2000-04-30  0:00 ` Ken Garlington [this message]
2000-04-30  0:00 ` DuckE
2000-04-30  0:00 ` Marin D. Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox