[fpc-devel] round(variant) needs type cast
Vincent Snijders
vsnijders at quicknet.nl
Mon Apr 16 23:20:06 CEST 2007
Vincent Snijders schreef:
> Hi,
>
> I have the following program:
> program project1;
>
> {$mode objfpc}{$H+}
>
> var
> v: variant;
> d: double;
>
> begin
> v := 3.3;
> d := Round(v);
> v := d;
> end.
>
> 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));
I mean:
d := Round(double(v));
> the error disappears.
>
> Why does the same source compile on win32, but fail on win64?
>
Vincent
More information about the fpc-devel
mailing list