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!news2.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Vinzent Hoefler" Newsgroups: comp.lang.ada Subject: Re: Fixed point constants issue Date: Fri, 24 Sep 2010 22:05:56 +0200 Message-ID: References: <1f0l0baynq1x7$.phl9cqpwcr37.dlg@40tude.net> <8f7b0nF6hfU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Trace: individual.net ugYot9lHoak5X0dcX8z/SQtKjR6/nI1hefP96jrnC+26Ab7FXu Cancel-Lock: sha1:RCkAvaFYyQSdlDeElqHPqyUmpzY= User-Agent: Opera Mail/10.62 (Win32) Xref: g2news1.google.com comp.lang.ada:14243 Date: 2010-09-24T22:05:56+02:00 List-Id: On Fri, 24 Sep 2010 16:43:29 +0200, Markus Sch=C3=B6pflin = wrote: > TEN_FEET_1 : constant :=3D HEIGHT * FEET_PER_METER; > TEN_FEET_2 : constant ALTITUDE :=3D HEIGHT * FEET_PER_METER; > begin > ALTITUDE_IO.PUT (TEN_FEET_1); NEW_LINE; -- gives 3.0 > ALTITUDE_IO.PUT (TEN_FEET_2); NEW_LINE; -- gives 5.0 (*) > end FIXED_POINT; > --->%--- > > (*) This certainly looks like FEET_PER_METER is converted to ALTITUDE = = > before doing the multiplication. Now that's interesting. Let me re-iterate: We have an Ada95 compiler = behaving as expected (although not necessarily intuitive) (GNAT), an Ada95 compil= er behaving like what's supposed to be an Ada83 difference (GreenHills, to finally reveal the name), and now an Ada83 compiler behaving as if it we= re an Ada95 compiler. At least according to what I understood so far... seriously, I'm no less= confused than I was before. > Another question regarding the implicit conversion from universal_real= = > to ALTITUDE: Does ARM83-3.5.6 apply here? And what does this mean: "If= = > the universal_real value is a safe number, the implicit conversion = > delivers the corresponding value; if it belongs to the range of safe = > numbers but is not a safe number, then the converted value can be any = = > value within the range defined by the safe numbers next above and belo= w = > the universal_real value." Is the compiler free to convert = > FEET_PER_METER to either 0.0 or 0.5? This would by my understanding, Ada95 puts it in different terms, but basically the compiler seems to be allowed to choose any of both choices= . But IANALL (although today a call from my co-worker started with "Ada Support there?" *g*). Vinzent. -- = There is no signature.