comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: choice of fixed point type
Date: 2000/03/05
Date: 2000-03-05T00:00:00+00:00	[thread overview]
Message-ID: <S_iw4.2837$im1.54677@news.pacbell.net> (raw)
In-Reply-To: 89rour$jak$1@nntp3.atl.mindspring.net

>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" <dwglessn@collins.rockwell.com> 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)]




  reply	other threads:[~2000-03-05  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-01  0:00 choice of fixed point type tmoran
2000-03-03  0:00 ` tmoran
2000-03-04  0:00   ` Richard D Riehle
2000-03-05  0:00     ` tmoran [this message]
2000-03-06  0:00       ` Robert Dewar
2000-03-06  0:00         ` David W. Glessner
2000-03-06  0:00           ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox