From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Arithmetic with durations
Date: 1997/09/11
Date: 1997-09-11T00:00:00+00:00 [thread overview]
Message-ID: <dewar.874035264@merv> (raw)
In-Reply-To: EGB0G3.1M.0.-s@inmet.camb.inmet.com
: In article <34149060.2E21@home.com> lmcoon@home.com writes:
: >The line that calculates the amount of simulation
: >time to wait for each event won't compile. My
: >compiler (Thomson ObjectAda running in Windows 95)
: >produces the following diagnostic: "LRM:4.5.5(20)
: >The fixed-fixed multiplying operators shall not be
: >used in a context where the expected type for the
: >result is universal_fixed."
This is a nice example of why RM references are not as helpful as
people think they might be. Here is the GNAT diagnostic for this
particular case:
1. procedure z is
2. type m is delta 0.1 range 0.0 .. 1.0;
3. a,b,c,d : m;
4.
5. begin
6. a := b * c * d;
|
>>> type cannot be determined from context
>>> explicit conversion to result type required
7. end;
which I think has a much better chance of prompting someone to figure
out the solution on their own!
prev parent reply other threads:[~1997-09-11 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-08 0:00 Arithmetic with durations Larry Coon
1997-09-09 0:00 ` Simon Wright
1997-09-10 0:00 ` Jerry van Dijk
1997-09-10 0:00 ` Tucker Taft
1997-09-11 0:00 ` Robert Dewar [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox