From: dik@cwi.nl (Dik T. Winter)
Subject: Re: Ada decimal elaboration, further experimentation.
Date: 3 Jul 88 23:36:27 GMT [thread overview]
Message-ID: <7576@boring.cwi.nl> (raw)
In-Reply-To: 8807031845.AA01533@ajpo.sei.cmu.edu
In article <8807031845.AA01533@ajpo.sei.cmu.edu> CONTR47@NOSC-TECR.ARPA writes:
> Norm Cohen writes:
...
> The Ada rule is that conversion takes place only at the bottom of the
> expression tree: Only numeric literals, named numbers, and attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> with universal results are convertible.
> ------------------------------
> Wellll. I tried Norm's suggestion (assuming he meant
> "constant dollar_type" instead of just "constant") so that
> my_dime : constant dollar_type := 0.01 + 0.01 etc. for a total of ten 0.01s
...
> How about other people trying this in case I'm
> missing something and also to see how other
Yes, you are. Norm did *not* mean constant dollar_type, but just constant.
You still are trying to get an implicit conversion from a universal real
expression to something of type dollar_type. This is not possible, as noted
by Norm.
Oh, BTW, our system (DG) gives:
My dime is .102
Your dime is .078
which is wrong on two counts.
--
dik t. winter, cwi, amsterdam, nederland
INTERNET : dik@cwi.nl
BITNET/EARN: dik@mcvax
next prev parent reply other threads:[~1988-07-03 23:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1988-07-03 18:49 Ada decimal elaboration, further experimentation CONTR47
1988-07-03 23:36 ` Dik T. Winter [this message]
1988-07-05 23:39 ` Michael Murphy
1988-07-09 19:22 ` Ada decimal elaboration, furthe stt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox