comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Characters and Numerics
Date: Thu, 06 Dec 2001 00:19:52 GMT
Date: 2001-12-06T00:19:52+00:00	[thread overview]
Message-ID: <IQyP7.407$Yy.30602@rwcrnsc53> (raw)
In-Reply-To: u0sd9lh6m11lc0@corp.supernews.com

> >   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);



      parent reply	other threads:[~2001-12-06  0:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-05 12:03 Characters and Numerics Duke Luke
2001-12-05 12:07 ` Lutz Donnerhacke
2001-12-05 12:16 ` M. A. Alves
2001-12-05 14:58   ` Matthew Heaney
2001-12-05 18:55     ` Wes Groleau
2001-12-05 19:24       ` Matthew Heaney
2001-12-05 21:27         ` Wes Groleau
2001-12-06  0:19     ` tmoran [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox