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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,184737148aef02ac X-Google-Attributes: gid103376,public From: "bob" Subject: Re: Fixed point multiplication ambiguity Date: 1999/01/14 Message-ID: <01be404b$74c75d20$0e2915c0@w95>#1/1 X-Deja-AN: 432610865 References: <369E14CA.90715966@lmco.com> Organization: B & D Associates X-NETCOM-Date: Thu Jan 14 11:54:13 AM CST 1999 Newsgroups: comp.lang.ada Date: 1999-01-14T11:54:13-06:00 List-Id: Marc, For what it is worth, I cant answer the LRM interpretation, haven't researched it yet. Maybe Hoos, or one of the others. But changing the 10.0 to integer 10 matches the "*" definition in package standard (gnat). It then works. See following. procedure Tf is D : Duration := 5.0; Dec_Delt : Integer := Integer(D * 10 + 0.5); begin null; end Tf; linux:~/atest> ada tf.adb gcc -c -g tf.adb gnatbind -x tf.ali gnatlink -g tf.ali cheers...bob Marc A. Criley wrote in article <369E14CA.90715966@lmco.com>... > The following test program is compilable by Rational Apex, but > GNAT rejects it with: > > tf.adb:5:38: type cannot be determined from context > tf.adb:5:38: explicit conversion to result type required > > I've studied the LRM 4.5.5(13-20), but who has the correct > interpretation doesn't quite jump out at me, though I am > leaning towards one over the other. > -------------------- > > procedure Tf is > > D : Duration := 5.0; > > Dec_Delt : Integer := Integer (D * 10.0 + 0.5); > > begin > null; > end Tf; > > ----------------------- > Marc A. Criley > Chief Software Architect > Lockheed Martin M&DS > (610) 354-7861 >