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,8bb44fc57f6db2f2 X-Google-Attributes: gid103376,public From: mfeldman@seas.gwu.edu Subject: Re: Number into String Date: 2000/01/06 Message-ID: <852e4g$1s9$1@news.netmar.com>#1/1 X-Deja-AN: 569131932 X-PNG: comp.lang.ada X-Complaints-To: abuse@newsone.net X-Trace: news.netmar.com 947174352 1929 205.139.138.14 (6 Jan 2000 15:59:12 GMT) Organization: NewsOne.Net - Free Usenet News via the Web - http://newsone.net/ X-MCC: bobduff@world.std.com NNTP-Posting-Date: 6 Jan 2000 15:59:12 GMT Newsgroups: comp.lang.ada Date: 2000-01-06T15:59:12+00:00 List-Id: In a previous article, Robert A Duff writes: >"Jeong, Lae Hyung" 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