From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Universal float or not - who's right ?
Date: Fri, 8 Sep 2006 20:35:54 -0500
Date: 2006-09-08T20:35:54-05:00 [thread overview]
Message-ID: <UK6dnTg4_IC6h5_YnZ2dnUVZ_oidnZ2d@megapath.net> (raw)
In-Reply-To: 45016cb7$1_4@news.bluewin.ch
"Gautier" <gautier@fakeaddress.nil> wrote in message
news:45016cb7$1_4@news.bluewin.ch...
...
> d: constant FF.FFLoat:= 2.0**4;
> -- Fails on compiler A,B,C
> -- "**" is not visible, an "use FF;" is missing
>
> package FPe is new P(FF.FFLoat,2.0**4);
> -- ** A,B,C differ:
> -- Passes on C: (2.0**4) probably taken as universal float
> -- Fails on compiler A,B: same reason as for constant d
Compiler C is wrong, the expression resolution for D and the parameter of
FPe should be the same. The short reason is that expressions can only have a
universal type if they are in a context that allows one (such as a named
number); otherwise *operators* (as opposed to literals) must have the
correct type. Adam explains why in detail.
Randy.
next prev parent reply other threads:[~2006-09-09 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-08 13:14 Universal float or not - who's right ? Gautier
2006-09-08 17:13 ` Adam Beneschan
2006-09-09 1:35 ` Randy Brukardt [this message]
2006-09-11 19:44 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox