comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: i need help w/problem
Date: 1999/02/22
Date: 1999-02-22T00:00:00+00:00	[thread overview]
Message-ID: <H0x5GOmX#GA.155@pet.hiwaay.net> (raw)
In-Reply-To: 36D0FD58.6474E351@rocketmail.com


Corey Ashford wrote in message <36D0FD58.6474E351@rocketmail.com>...
<snip>
>That conversion won't work.
>
>Use something like:
>
>          number : constant string := float'image(float_variable);
>
>in this case, float_variable = 999.98.
>
>[rest of post snipped due to picky newgroup server]


Well, this conversion won't work either, because the 'image attribute uses
exponential notation -- see RM95 3.5(33).

It's probably better to use an instantiation of Text_IO.Float_IO.Put, with
appropriate Fore, Aft, and Exp values to write the string.  This will have
the further advantage that it will not be necessary to search for the
decimal point, because its position will have been specified by means of the
parameters.

Of course, there will be trailing zeroes on the fractional part which may
need to be dropped, so a search will be needed there.







  parent reply	other threads:[~1999-02-22  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-21  0:00 i need help w/problem zufandel
1999-02-22  0:00 ` Allan Davis
1999-02-22  0:00   ` bill
1999-02-22  0:00   ` Corey Ashford
1999-02-22  0:00     ` robert_dewar
1999-02-22  0:00       ` dennison
1999-02-22  0:00         ` zufandel
1999-02-22  0:00       ` Matthew Heaney
1999-02-22  0:00         ` Mike Silva
1999-02-22  0:00           ` Nick Roberts
1999-02-22  0:00           ` zufandel
1999-02-22  0:00           ` dennison
1999-02-22  0:00     ` David C. Hoos, Sr. [this message]
1999-02-22  0:00       ` Matthew Heaney
1999-02-23  0:00         ` Pascal Obry
1999-02-23  0:00           ` Matthew Heaney
replies disabled

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