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,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c115c2935480db5f,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-05 22:25:04 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: Converting Char to Enum Date: Wed, 6 Mar 2002 07:23:14 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1015395903 61449 137.194.161.2 (6 Mar 2002 06:25:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 6 Mar 2002 06:25:03 +0000 (UTC) Return-Path: Content-MD5: SgMWYDSFKsMhMs3RM8zmRA== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:20845 Date: 2002-03-06T07:23:14+01:00 > So if I want to output only the character without the quotes, I have > to convert it to string? No, you have to use the character operations of Text_IO (if your characters are of type Standard.Character. No conversion to Standard.String is necessary. Note that you may write: ote that you may write: procedure My_Program is type My_Character is (something, 'A', 'a', 'B', 'b', anything); type My_String is array (Positive range <>) of My_Character; V: My_String := "AAbbbA" & something & "aBBB"; begin ... end My_Program; String literals like "AAbbbA" are available for all character types, a character type being a type with at least one character literal, a character literal being something like 'a'. Note that the apperance of something and anything above in the type definition does not prevent My_Character from being a character type, you only cannot put these literals into a string literal, you have to do it in the way above. These strings are however not compatible with Standard.String, so you cannot use Text_IO with them directly.