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,b257fba0affa289 X-Google-Attributes: gid103376,public From: Preben Randhol Subject: Re: fixed type (delta) in ada Date: 1999/11/29 Message-ID: #1/1 X-Deja-AN: 554331355 References: <383f6dbb.22609744@news.tstonramp.com> <81pvi5$sl1$1@nnrp1.deja.com> <38409C87.69EC865@easystreet.com> <87n1rzdm4u.fsf@deneb.cygnus.argh.org> <3841B57A.42C70EC0@easystreet.com> X-Complaints-To: usenet@itea.ntnu.no X-Trace: kopp.stud.ntnu.no 943862521 15011 129.241.83.82 (29 Nov 1999 08:02:01 GMT) Organization: ProgramVareVerkstedet NNTP-Posting-Date: 29 Nov 1999 08:02:01 GMT Newsgroups: comp.lang.ada Date: 1999-11-29T08:02:01+00:00 List-Id: Al Christians writes: | Next question: I haven't seen where it says that | | Money_Io.Put(0.20 * 351.0); | | Should put 68.55, which is what GNAT 3.12p does. My guess | would be that 0.20 * 351.0 should be a static expression of | type universal real, which should convert to type Money | equal to 70.2 within +/- 0.01. Is it according to the LRM | to convert both the 0.20 and 351.0 to the Money type before | doing the multiply? Any other explanations? It has to do with fixed point types and Decimal types (the prior gives 68.55 the latter gives 70.2). If available see "Programming in Ada 95" 2.ed by John Barnes (ISBN: 0-201-34293-6) chapter 15.5 and 15.6. -- Preben Randhol -- [randhol@pvv.org] -- [http://www.pvv.org/~randhol/] "Det eneste trygge stedet i verden er inne i en fortelling." -- Athol Fugard