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,e3fdc7c00d74a44f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-05 06:54:45 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: Characters and Numerics Date: Wed, 5 Dec 2001 09:58:35 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: 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:17443 Date: 2001-12-05T09:58:35-05:00 List-Id: "M. A. Alves" wrote in message news:mailman.1007554622.31106.comp.lang.ada@ada.eu.org... > On 5 Dec 2001, Duke Luke wrote: > > How can I change type character to type natural?? > > e.g: '3' -> 3; > > Use attribute Value of the type Natural upon a String version of > the Character e.g. > > N := Natural'Value(C & ""); Or just N := Character'Pos (C) - Character'Pos ('0');