comp.lang.ada
 help / color / mirror / Atom feed
* converting lower case to upper case
@ 1995-04-01  0:00 Greg Schmitt
  1995-04-02  0:00 ` Chris O'Regan
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Schmitt @ 1995-04-01  0:00 UTC (permalink / raw)


Hi all.  I am doing an ada project and I need to convert lower
case character to a upper case character. Is there a simple way 
to do this such as:
   .
   .
   .   
   inch : character;
begin
   if inch>='a' and inch<='z' then
       inch:=toupper(inch);
   end if;
end proc;

I am using a compiler on a VAX4000 I believe that it follows the 83 standards.

Thank you.

Greg Schmitt
gschmitt@cs.mtech.edu




^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: converting lower case to upper case
@ 1995-04-04  0:00 tmoran
  1995-04-06  0:00 ` Robert Dewar
  0 siblings, 1 reply; 4+ messages in thread
From: tmoran @ 1995-04-04  0:00 UTC (permalink / raw)


Ada 95 has a T_Upper function, but Ada 83 doesn't (though your
compiler vendor may provide one).  If you need to roll your own:
function To_Upper(Item : in Character) return Character is
  Raise_It:constant array('a' .. 'z') of Character
    :="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
begin
  if Item in Raise_It'range then return Raise_It(Item);
  else return Item;
  end if;
end To_Upper;




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1995-04-06  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-04-01  0:00 converting lower case to upper case Greg Schmitt
1995-04-02  0:00 ` Chris O'Regan
  -- strict thread matches above, loose matches on Subject: below --
1995-04-04  0:00 tmoran
1995-04-06  0:00 ` Robert Dewar

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