[fpc-devel] round(variant) needs type cast
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Apr 17 09:20:02 CEST 2007
On 16 apr 2007, at 23:14, Vincent Snijders wrote:
> If I compile this on win32, then there is no problem. If I compile
> this on win64, I get the following error:
> project1.pas(11,8) Error: Can't determine which overloaded function
> to call
>
> If change line 11 to
> d := Round(round(v));
> the error disappears.
>
> Why does the same source compile on win32, but fail on win64?
Because we do no support the extended type on win64, and the priority
for overload choosing between double and currency is the same for
variants (as in Delphi), and there is a round(double) and a round
(currency). You get the same error on any non-x86 platform as well.
Jonas
More information about the fpc-devel
mailing list