From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aceef612e0190367 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-05 11:30:28 PST Path: supernews.google.com!sn-xit-02!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: mark Newsgroups: comp.lang.ada Subject: Re: Integer? float? confused... Date: Thu, 05 Apr 2001 18:30:04 -0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: Content-Type: text/plain Content-Disposition: inline Mime-Version: 1.0 X-Mailer: MIME-tools 4.104 (Entity 4.117) References: <998km4$19j22@tech.port.ac.uk> X-Complaints-To: newsabuse@supernews.com Xref: supernews.google.com comp.lang.ada:6521 Date: 2001-04-05T18:30:04+00:00 List-Id: A reason for you experencing this error is that the computer is finding a integer and not a Float. A Float is a number with a decimal point in it e.g. 16.00 or 0.67 etc A integer is a number that is exact e.g. 1,2,3,4,5, 16 etc The fact that you have said that "Num" is an integer when it is then stated that it is Float make the machine confused. Try making "Num" a Float and that should clear up the error message!! Good luck WM wrote: > > > 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; > > REMOVED INCLUDED FILE sin; > > -- Posted via CNET Help.com http://www.help.com/