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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91965a012526b259 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: =?iso-8859-1?q?Bj=F6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: Float to String Date: Sat, 13 Nov 2004 19:41:07 +0100 Organization: Cuivre, Argent, Or Message-ID: References: <4db435b431f7a7d97443b8332a896c82@localhost.talkaboutprogramming.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1100371327 73306 212.85.156.195 (13 Nov 2004 18:42:07 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Sat, 13 Nov 2004 18:42:07 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.7 In-Reply-To: <4db435b431f7a7d97443b8332a896c82@localhost.talkaboutprogramming.com> Content-Disposition: inline X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:6191 Date: 2004-11-13T19:41:07+01:00 l=F6rdag 13 november 2004 17:37 skrev Ginduskina: > Hello. This may seem a syupid question, given the kind of replies users > have posted so far yet, but.... I can't understand how to pass from float > to string.. i don't need much precision, i just need the instruction/s i > need to use to get my string with my float number... which will have its > point numbers, and the exponent numbers > use the attibute Image as in Float'Image. Works on most (all?) scalar and=20 float types, as integer, duration, and new scalar and float types you define with Text_Io; procedure Float_To_String is A_Float : Float :=3D 1.23456789; A_String : String :=3D Float'Image(A_Float); begin Text_Io.Put_Line(A_String); end Float_To_String; would produce [bnl@della2 test]$ ./float_to_string 1.23457E+00 [bnl@della2 test]$=20