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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no 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 10:55:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3C0E6D91.43FEE78F@usa.com> From: Wes Groleau Reply-To: wgroleau@usa.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Characters and Numerics References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 05 Dec 2001 13:55:13 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1007578519 151.168.144.162 (Wed, 05 Dec 2001 12:55:19 CST) NNTP-Posting-Date: Wed, 05 Dec 2001 12:55:19 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:17464 Date: 2001-12-05T13:55:13-05:00 List-Id: Matthew Heaney wrote: > > "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'); If C = 'Z' the former will raise constraint error; the latter will assign N a large number. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau