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 16:19:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!wn1feed!wn2feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Characters and Numerics References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Thu, 06 Dec 2001 00:19:52 GMT NNTP-Posting-Host: 204.127.202.212 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1007597992 204.127.202.212 (Thu, 06 Dec 2001 00:19:52 GMT) NNTP-Posting-Date: Thu, 06 Dec 2001 00:19:52 GMT Organization: AT&T Broadband Xref: archiver1.google.com comp.lang.ada:17489 Date: 2001-12-06T00:19:52+00:00 List-Id: > > N := Natural'Value(C & ""); > > Or just > > N := Character'Pos (C) - Character'Pos ('0'); or Digit_Value : constant array(Character range '0' .. '9') of Natural := (0,1,2,3,4,5,6,7,8,9); ... N := Digit_Value(C);