comp.lang.ada
 help / color / mirror / Atom feed
* Re: Number into String
@ 2000-01-06  0:00 mfeldman
  0 siblings, 0 replies; 12+ messages in thread
From: mfeldman @ 2000-01-06  0:00 UTC (permalink / raw)


In a previous article,  Robert A Duff  <bobduff@world.std.com> writes:
>"Jeong, Lae Hyung" <lovelace@dreamwiz.com> writes:
>
>> How can I convert float number into String ?
>
>Use the Float'Image attribute.
>
>- Bob

This is correct but a bit oversimplified. Float'Image returns a string
giving the Float value in "E-notation", and provides no way for the
programmer to specify other formats.

Instead, look up the details of Ada.Float_Text_IO.Put (in RM A.10). 
There are three kinds of Put: to Standard_Output, to a named file,
and to a string. This last form seems to be little known, but is very
handy, because you can use all the formatting parameters: Fore, Aft,
Exp, etc. 

There are Get-from-string and Put-to-string forms in all the various
Ada.Text_IO packages. They are very useful in parsing input and
formatting output!

Mike Feldman


     -----  Posted via NewsOne.Net: Free Usenet News via the Web  -----
     -----  http://newsone.net/ --  Discussions on every subject. -----
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net




^ permalink raw reply	[flat|nested] 12+ messages in thread
* Number into String
@ 2000-01-06  0:00 Jeong, Lae Hyung
  2000-01-06  0:00 ` Jeong, Lae Hyung
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Jeong, Lae Hyung @ 2000-01-06  0:00 UTC (permalink / raw)


NUM : Integer := 123;

  . . .

How can I convert Integer_value NUM into String_value.


Woud you help me with a simple code?.






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-01-06  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06  0:00 Number into String mfeldman
  -- strict thread matches above, loose matches on Subject: below --
2000-01-06  0:00 Jeong, Lae Hyung
2000-01-06  0:00 ` Jeong, Lae Hyung
2000-01-06  0:00   ` Robert A Duff
2000-01-06  0:00 ` Jeong, Lae Hyung
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   ` Robert Dewar
2000-01-06  0:00 ` Richard D Riehle
2000-01-06  0:00 ` David C. Hoos, Sr.

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