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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,388fc53f584bd695 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?UTF-8?B?TWFya3VzIFNjaMO2cGZsaW4=?= Newsgroups: comp.lang.ada Subject: Re: Fixed point constants issue Date: Tue, 28 Sep 2010 10:16:30 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <1f0l0baynq1x7$.phl9cqpwcr37.dlg@40tude.net> <8f7b0nF6hfU1@mid.individual.net> NNTP-Posting-Host: hzAn46cwLozSmDBblnAvDQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 Xref: g2news1.google.com comp.lang.ada:14285 Date: 2010-09-28T10:16:30+02:00 List-Id: Am 27.09.2010 20:57, schrieb Jeffrey Carter: > On 09/27/2010 03:33 AM, Markus Schöpflin wrote: >> >> The implicit conversion from universal_real to ALTITUDE is only done >> when the operand is either a numeric literal, a named number, or an >> attribute. This rules out the first overload. > > I don't follow this. Could you please elaborate? To quote ARM83 4.6 again: "An implicit conversion of an operand of type [...] universal_real to another real type, can only be applied if the operand is either a numeric literal, a named number, or an attribute; [...]" So an implicit conversion will never be applied to the result of universal_integer * universal_real, as the operand of the conversion is an expression. But an implicit conversion to ALTITUDE would be needed for universal_integer * universal_real -> universal_real to be used. On the other hand, the line "TEN_FEET_3 : constant Altitude := TEN_FEET_1;" from the original example does use an implicit conversion, precisely because TEN_FEET_1 is a named number of type universal_real. Or am I completely off track here? Markus