comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Characters and Numerics
Date: Wed, 5 Dec 2001 09:58:35 -0500
Date: 2001-12-05T09:58:35-05:00	[thread overview]
Message-ID: <u0sd9lh6m11lc0@corp.supernews.com> (raw)
In-Reply-To: mailman.1007554622.31106.comp.lang.ada@ada.eu.org


"M. A. Alves" <maa@liacc.up.pt> 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');







  reply	other threads:[~2001-12-05 14:58 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 [this message]
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
replies disabled

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