From: Reinert Korsnes <reinert.korsnes@chello.no>
Subject: Problems with gcc, gnat and RedHat 8
Date: Fri, 11 Oct 2002 11:14:33 +0200
Date: 2002-10-11T11:14:33+02:00 [thread overview]
Message-ID: <ao656o$2fl$1@dolly.uninett.no> (raw)
Hi,
I just installed RedHat 8 on my computer and
try to use Ada from the RedHat package.
Seems like I have some problems.
Could someone with similar configuration try this program below ?
----------------------------------------------------------
with Ada.Numerics.Generic_Elementary_Functions,Text_IO;
use Text_IO;
procedure test1 is
type Real is new Float;
package Flt_Io is new Text_IO.Float_Io (Real);
package Int_Io is new Text_IO.Integer_Io (Integer);
package E_F is new Ada.Numerics.Generic_Elementary_Functions (Real);
use E_F,Flt_Io,Int_Io;
N : Integer := 10;
x : Real := 10.0;
begin
for I in 1 .. N loop
Put(" x: "); Put (x,4,7,0);
Put(" sin(x): "); Put (sin(x),4,7,0);
New_Line (1);
end loop;
end;
-----------------------------------------------------------------
** I use the following commands (via Makefile):
gnatmake test1.adb
gcc -c test1.adb
gnatbind -x test1.ali
gnatlink test1.ali
** And I get the following output:
host$ ./test1
x: 10.0000000 sin(x): 0.0000000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
x: 10.0000000 sin(x): 100663214.2500000
** sin(x) > 1 ?
** What I do wrong here ? Or something wrong in RH8's Ada ?
reinert
next reply other threads:[~2002-10-11 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-11 9:14 Reinert Korsnes [this message]
2002-10-11 12:14 ` Problems with gcc, gnat and RedHat 8 arvids lemchens
2002-10-11 15:23 ` zhenggen
2002-10-11 16:15 ` Reinert Korsnes
2002-10-14 0:24 ` zhenggen
2002-10-12 10:57 ` Florian Weimer
2002-10-13 10:19 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox