comp.lang.ada
 help / color / mirror / Atom feed
* Ada.Text_IO.Fixed_IO - strange prefix in output
@ 2008-08-19 15:03 Maciej Sobczak
  2008-08-20 11:48 ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej Sobczak @ 2008-08-19 15:03 UTC (permalink / raw)


Consider:

with Ada.Text_IO;
with Ada.Calendar;

procedure A is

   package Duration_IO is new
     Ada.Text_IO.Fixed_IO (Ada.Calendar.Day_Duration);

   D : Ada.Calendar.Day_Duration := 0.0;

begin
   Duration_IO.Put (D);
end A;

The above program produces the following output:

N = 1
     0.000000000

I use GNAT 3.4.6 (yes, that old). Was this a compiler/runtime bug?
The output from newer compiler contains only the number.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Ada.Text_IO.Fixed_IO - strange prefix in output
  2008-08-19 15:03 Ada.Text_IO.Fixed_IO - strange prefix in output Maciej Sobczak
@ 2008-08-20 11:48 ` Stephen Leake
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 2008-08-20 11:48 UTC (permalink / raw)


Maciej Sobczak <see.my.homepage@gmail.com> writes:

> Consider:
>
> with Ada.Text_IO;
> with Ada.Calendar;
>
> procedure A is
>
>    package Duration_IO is new
>      Ada.Text_IO.Fixed_IO (Ada.Calendar.Day_Duration);
>
>    D : Ada.Calendar.Day_Duration := 0.0;
>
> begin
>    Duration_IO.Put (D);
> end A;
>
> The above program produces the following output:
>
> N = 1
>      0.000000000
>
> I use GNAT 3.4.6 (yes, that old). Was this a compiler/runtime bug?

Yes, they delivered the runtime with "debug" pragmas enabled. You can
recompile the runtime.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-20 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-19 15:03 Ada.Text_IO.Fixed_IO - strange prefix in output Maciej Sobczak
2008-08-20 11:48 ` Stephen Leake

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