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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38d8b4bd1cb45ff X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: choice of fixed point type Date: 2000/03/05 Message-ID: #1/1 X-Deja-AN: 593269181 References: <89rour$jak$1@nntp3.atl.mindspring.net> X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 952220722 206.170.2.223 (Sat, 04 Mar 2000 17:45:22 PST) Organization: SBC Internet Services NNTP-Posting-Date: Sat, 04 Mar 2000 17:45:22 PST Newsgroups: comp.lang.ada Date: 2000-03-05T00:00:00+00:00 List-Id: >Keeping us in suspense, Tom? Which three gave you the good information? Which >one got it wrong? Eager minds want to know. :-) Given: with Ada.Text_Io; procedure test is type duration is delta 1.0 range 0.0 .. 60.0; f : float; i : integer := 3; begin f := float(16.0/i); ada.text_io.put_line(float'image(f)); end test; Gnat 3.12p NT gave no error message and used, apparently, Standard.Duration ObjectAda 7.1.2.205 said --------------------Target: Win32 (Intel) Debug-------------------- test.adb: Error: line 10 col 18 LRM:8.6(31), Expression is ambiguous when interpreted as an expression of any, Returning first interpretation test.adb: Error: line 10 col 8 The expression is ambiguous, Continuing Front end of ..\examples\test.adb failed with 2 errors. Tool execution failed. "David W. Glessner" tells me: Sure 'nuff, Rational Apex 3.0.0b doesn't compile your program. 08:55:32 >>> Line 7: F := Float (0.000_0001 / I); 08:55:32 *** 0.000_0001 / I is ambiguous 08:55:32 *** "/" could be (in TEST_FIXED_DURATION) Test_Fixed_Duration.Duration."/" 08:55:32 *** "/" could be (in STANDARD) "/" Janus 3.1.1e NT said: In File F:\test.ada at line 10 -------------- 9: begin 10: f := float(16.0/i); -------------------------^ *ERROR* Unable to resolve expression (6.4.6) [RM 5.2(4)]