comp.lang.ada
 help / color / mirror / Atom feed
From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: Re: Fixed point constants issue
Date: Tue, 28 Sep 2010 10:16:30 +0200
Date: 2010-09-28T10:16:30+02:00	[thread overview]
Message-ID: <i7s88s$vrv$1@speranza.aioe.org> (raw)
In-Reply-To: i7qq7u$6u3$1@tornado.tornevall.net

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




  reply	other threads:[~2010-09-28  8:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 17:27 Fixed point constants issue Vinzent Hoefler
2010-09-13 18:04 ` Dmitry A. Kazakov
2010-09-13 18:25   ` Vinzent Hoefler
2010-09-13 19:05     ` Niklas Holsti
2010-09-13 20:35       ` Vinzent Hoefler
2010-09-13 20:35       ` Jeffrey Carter
2010-09-13 21:06         ` Vinzent Hoefler
2010-09-14  5:39         ` Niklas Holsti
2010-09-24 14:43         ` Markus Schöpflin
2010-09-24 20:05           ` Vinzent Hoefler
2010-09-24 21:38           ` Jeffrey Carter
2010-09-24 22:42             ` Vinzent Hoefler
2010-09-25  0:16               ` Jeffrey Carter
2010-09-27 10:33                 ` Markus Schöpflin
2010-09-27 18:57                   ` Jeffrey Carter
2010-09-28  8:16                     ` Markus Schöpflin [this message]
2010-09-28 17:28                       ` Jeffrey Carter
2010-10-05  6:27                         ` Randy Brukardt
2010-10-05 18:40                           ` Jeffrey Carter
2010-09-27 17:58             ` Adam Beneschan
2010-09-13 20:32     ` Dmitry A. Kazakov
2010-09-13 21:08       ` Vinzent Hoefler
2010-09-14  6:54         ` J-P. Rosen
2010-09-14 18:28           ` Vinzent Hoefler
2010-09-14  7:47         ` Dmitry A. Kazakov
2010-09-14 17:42           ` Vinzent Hoefler
2010-09-15  8:35             ` Dmitry A. Kazakov
2010-09-15 17:24               ` Vinzent Hoefler
2010-09-15 20:11                 ` Dmitry A. Kazakov
2010-09-14 19:44   ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox