Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!amdahl!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.ada Subject: Re: Ada decimal elaboration, further experimentation. Message-ID: <7576@boring.cwi.nl> Date: 3 Jul 88 23:36:27 GMT References: <8807031845.AA01533@ajpo.sei.cmu.edu> Organization: CWI, Amsterdam Lines: 28 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