From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6de5be91df1d0de2 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: i need help w/problem Date: 1999/02/22 Message-ID: #1/1 X-Deja-AN: 447062103 References: <7aqjie$npj@netaxs.com> <36D0FD58.6474E351@rocketmail.com> Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1999-02-22T00:00:00+00:00 List-Id: Corey Ashford wrote in message <36D0FD58.6474E351@rocketmail.com>... >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.