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,d17f61d1647df47d X-Google-Attributes: gid103376,public From: ct_oreg@vega.concordia.ca (Chris O'Regan) Subject: Re: converting lower case to upper case Date: 1995/04/02 Message-ID: <3lmihd$msm@newsflash.concordia.ca>#1/1 X-Deja-AN: 100721939 distribution: na references: <3llhpu$18v@nyx10.cs.du.edu> organization: Concordia University, Montreal, Canada nntp-posting-user: ct_oreg newsgroups: comp.lang.ada Date: 1995-04-02T00:00:00+00:00 List-Id: In article <3llhpu$18v@nyx10.cs.du.edu> GS := Greg Schmitt GS>Hi all. I am doing an ada project and I need to convert lower GS>case character to a upper case character. Is there a simple way GS>to do this such as: You can easily create your own To_Upper function like this: function To_Upper (Cin : Character) return Character is I : Integer; Cout : Character; begin I := Character'Pos ('a') - Character'Pos ('Z'); if Cin in 'a'..'z' then Cout := Character'Val (Character'Pos (Cin) - I); else Cout := Cin; end if; return Cout; end; I believe that the character set is standard, so you could redeclare "I" as: I : constant Integer := 32; Chris O'Regan -- ______________________________________________________________________ Chris O'Regan Computer Engineering ct_orega@ECE.Concordia.CA Concordia University