comp.lang.ada
 help / color / mirror / Atom feed
From: Lao Xiao Hai <laoxhai@ix.netcom.com>
Subject: Re: Ascii keyword??
Date: Fri, 16 Feb 2001 11:29:47 -0800
Date: 2001-02-16T19:32:58+00:00	[thread overview]
Message-ID: <3A8D7FAB.FC6D4A40@ix.netcom.com> (raw)
In-Reply-To: 3A8D72D4.BBB57470@blueyonder.co.uk



Richard wrote:

> ok am new to this ada thing, so  is there a package and/or keyword i can
> use to convert a decimal number to a acsii character and vice versa
>
> thanks :)

The problem of converting a numeric value to a string and vice versa is
quite
nicely addressed in package Ada.Text_IO.    For example, if you have a
floating
point type, you can instantiate Ada.Text_IO.Float_IO.    There are GET and
PUT
operations available from that instantiation to convert a string to a
floating point
value or get a floating point value from a string.

This same feature is available for all the numeric types:  integers,
decimal, fixed-point,
and modular.

Richard Riehle





  parent reply	other threads:[~2001-02-16 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-16 18:34 Ascii keyword?? Richard
2001-02-16 18:46 ` Pascal Obry
2001-02-16 18:52 ` Marin David Condic
2001-02-16 19:29 ` Lao Xiao Hai [this message]
2001-02-16 23:22 ` David C. Hoos, Sr.
2001-02-17  0:54   ` Jeffrey Carter
2001-02-17  4:51   ` Lao Xiao Hai
replies disabled

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