From: "WM" <wwminirl@hotmail.com>
Subject: Integer? float? confused...
Date: Tue, 20 Mar 2001 21:31:27 -0000
Date: 2001-03-20T21:31:27+00:00 [thread overview]
Message-ID: <99eg1q$19j27@tech.port.ac.uk> (raw)
I have written a program to calculate Sin. The compiler(AdaGIDE 6.23) said:
"expected type standard.float", why? Please piont out errors, Thanks.
with Ada.Text_Io, Ada.Integer_Text_Io,Ada.Float_Text_Io;
use Ada.Text_Io, Ada.Integer_Text_Io,Ada.Float_Text_Io;
procedure sin is
sin_result : float;
i : integer;
function Calc_Sin (Num : Integer) return float is
begin
Sin_Result := Num - (Num ** 3) / 6 + (Num ** 5) / 120;
return Sin_Result;
end Calc_Sin;
begin
put("input int: ");
get(i);
Sin_Result := Calc_Sin(Num=>i);
Put(Item=>Sin_Result, Fore=>1, Aft=>4, Exp=>0);
end sin;
next reply other threads:[~2001-03-20 21:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-20 21:31 WM [this message]
2001-03-23 7:07 ` Integer? float? confused Sven Nilsson
-- strict thread matches above, loose matches on Subject: below --
2001-03-20 21:31 WM
2001-04-05 18:30 ` mark
2001-03-20 21:31 WM
2001-03-20 22:55 ` chris.danx
2001-03-20 22:59 ` EtienneB
2001-03-21 1:32 ` Ken Garlington
2001-03-23 12:08 ` dis00109
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox