Ada.Text_IO.Fixed_IO - strange prefix in output

This is a discussion on Ada.Text_IO.Fixed_IO - strange prefix in output within the ADA forums in Programming Languages category; 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...

Go Back   Application Development Forum > Programming Languages > ADA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-19-2008, 11:03 AM
Maciej Sobczak
Guest
 
Default Ada.Text_IO.Fixed_IO - strange prefix in output

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
Reply With Quote
  #2  
Old 08-20-2008, 07:48 AM
Stephen Leake
Guest
 
Default Re: Ada.Text_IO.Fixed_IO - strange prefix in output

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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:39 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.