comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Number into String
Date: 2000/01/06
Date: 2000-01-06T00:00:00+00:00	[thread overview]
Message-ID: <85208t$15j$1@ash.prod.itd.earthlink.net> (raw)
In-Reply-To: 8517up$t0m$1@green.kreonet.re.kr


Jeong, Lae Hyung <lovelace@dreamwiz.com> wrote in message
news:8517up$t0m$1@green.kreonet.re.kr...
> NUM : Integer := 123;
>
>   . . .
>
> How can I convert Integer_value NUM into String_value.
>
>
> Woud you help me with a simple code?.
>
Every scalar type has an attrinute, 'Image, that returns the
image of its argument's value, as a string.  See the Ada Reference
Manual Section 3.5 for more details.

For your example, Integer'Image (Num) returns " 123".

--
David C. Hoos -- W1DCH
-------------------------------------
The primary purpose of the DATA statement is to give names to
constants; instead of referring to pi as 3.141592653589793 at every
appearance, the variable PI can be given that value with a DATA
statement and used instead of the longer form of the constant.  This
also simplifies modifying the program, should the value of pi change.
                -- FORTRAN manual for Xerox Computers







  parent reply	other threads:[~2000-01-06  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-06  0:00 Number into String Jeong, Lae Hyung
2000-01-06  0:00 ` Richard D Riehle
2000-01-06  0:00 ` Jeong, Lae Hyung
2000-01-06  0:00   ` Robert Dewar
2000-01-06  0:00   ` reason67
2000-01-06  0:00     ` Robert Dewar
2000-01-06  0:00       ` reason67
2000-01-06  0:00         ` James S. Rogers
2000-01-06  0:00 ` Jeong, Lae Hyung
2000-01-06  0:00   ` Robert A Duff
2000-01-06  0:00 ` David C. Hoos, Sr. [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-01-06  0:00 mfeldman
replies disabled

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