comp.lang.ada
 help / color / mirror / Atom feed
From: "Stefano M." <stefano.m@nospam.tin.it>
Subject: Re: Gnat's Ada.Float_Text_IO.Put problem
Date: Wed, 14 Jan 2004 17:11:54 +0100
Date: 2004-01-14T17:11:54+01:00	[thread overview]
Message-ID: <bu3q0t$i2d$1@fata.cs.interbusiness.it> (raw)
In-Reply-To: <8c4gd1-ifb.ln1@beastie.ix.netcom.com>

Dennis Lee Bieber wrote:

>         Please supply the EXACT code you are having problems with...
> 
>         Did you even try compiling that? Here's my paraphrased copy of YOUR 
> code, AND the compiler output!

You are right, there was a missing line (since I cleaned the program a 
bit before pasting it on the message).
Anyway:

ste@sim:~/prove$ cat main.adb
with Ada.Float_Text_IO;
with Ada.Text_IO; use Ada.Text_IO;

procedure Main is
      Sample_Float : Float := 10.123;
begin
      Put("Standard 'put' behaviour from Ada.Float_Text_IO: 10,123 = ");
      Ada.Float_Text_IO.Put(Sample_Float);
end Main;
ste@sim:~/prove$ gnatmake main
gcc -c main.adb
gnatbind -x main.ali
gnatlink main.ali
ste@sim:~/prove$ ./main
Standard 'put' behaviour from Ada.Float_Text_IO: 10,123 = -0.00000E+00

As you can see the problem is still there.
I found this thread on one of the ACT mailing lists which shed some 
light on the matter:
http://www.act-europe.fr/mail/chat/2000-07/threads.html#00038
Seems like I'm not the only one experiencing this kind of problem.

> [wulfraed@beastie ada]$ ./fio
> Standard float IO 'put' of 10.123 = 1.01230E+01

Lucky you!

My performance test programs all rely on the float image function to 
display the results... Missing that function, I coded a very na�ve one, 
using the Float'Floor function and Integer casts all around, but I often 
get costraint errors, this problems's gonna drive me crazy.

Stefano



  parent reply	other threads:[~2004-01-14 16:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14 13:39 Gnat's Ada.Float_Text_IO.Put problem Stefano M.
2004-01-14 14:58 ` Adrian Knoth
     [not found] ` <8c4gd1-ifb.ln1@beastie.ix.netcom.com>
2004-01-14 16:11   ` Stefano M. [this message]
2004-01-14 16:44     ` Adrian Knoth
2004-01-15  8:14       ` Stefano M.
2004-01-15  8:39         ` Adrian Knoth
2004-01-15 18:50         ` tmoran
2004-01-16  8:23           ` Duncan Sands
2004-01-16  8:48             ` tmoran
2004-01-16  9:45               ` Duncan Sands
2004-01-16 13:18                 ` Jeff C,
2004-01-16 13:52                   ` Duncan Sands
2004-01-15  1:55     ` Georg Bauhaus
2004-01-15  8:46       ` Stefano M.
2004-01-15 11:56         ` Georg Bauhaus
2004-01-15 11:02       ` Stefano M.
2004-01-15 14:20         ` Georg Bauhaus
2004-01-15  1:50 ` Jeff C,
2004-01-15  8:18   ` Stefano M.
replies disabled

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