From: Pascal MALAISE <malaise@magic.fr>
Subject: Re: incrementing characters
Date: 1998/07/10
Date: 1998-07-10T18:20:00+00:00 [thread overview]
Message-ID: <35A65B50.BC91E303@magic.fr> (raw)
In-Reply-To: 01bdaa89$e1084920$0a39a8c2@default
Jamie wrote:
> character := character + offset
function UPPER_CHAR (CHAR : CHARACTER) return CHARACTER is
OFFSET : constant INTEGER := CHARACTER'POS('A') -
CHARACTER'POS('a');
begin
if CHAR in 'a' .. 'z' then
-- This is what you are looking for?
return CHARACTER'VAL( CHARACTER'POS(CHAR) + OFFSET );
else
return CHAR;
end if;
end UPPER_CHAR;
--
Pascal MALAISE | E-mail:
22 Avenue de CHOISY | (priv) malaise@magic.fr
75013 PARIS | (prof) malaise@fr.airsysatm.thomson-csf.com
FRANCE
prev parent reply other threads:[~1998-07-10 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-08 0:00 incrementing characters Jamie
1998-07-09 0:00 ` Dmitriy Anisimkov
1998-07-10 0:00 ` Pascal MALAISE [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox