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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91965a012526b259 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!freenix!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: Float to String References: <220c7e104b45a9c8f59f8adbbb88f08d@localhost.talkaboutprogramming.com> From: Pascal Obry Organization: ACT Europe - http://www.act-europe.fr User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Date: 13 Nov 2004 17:55:51 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: AVelizy-151-1-41-128.w82-120.abo.wanadoo.fr X-Trace: 1100364953 news.wanadoo.fr 8324 82.120.23.128:4323 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:6190 Date: 2004-11-13T17:55:51+01:00 List-Id: "Ginduskina" writes: > 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, The way to do that is quite easy: Str : constant String := Float'Image (3.4); And from a String to a Float: F : constant Float := Float'Value (Str); But, as discussed in this thread, you are going to loose precision. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595