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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fb5ce1b4831d82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-30 06:19:05 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: How to get an ASCII code ? Date: Tue, 30 Oct 2001 09:22:13 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <20011030-135944-285742@foorum.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:15409 Date: 2001-10-30T09:22:13-05:00 List-Id: "Apokrif" wrote in message news:20011030-135944-285742@foorum.com... > > How can I get the ASCII code for a given character in Ada? Is there a function > similar to Pascal 'ord' ? declare C : constant Character := 'a'; I : constant Natural := Character'Pos (C); begin To back the other way, use Character'Val.