[Lazarus] Function overloading under 32/64bit

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Function overloading under 32/64bit

t.wieckowski
I've a strange problem. My app compile (fpc 2.4.2) ok under Win32 and
x64-Linux. Now I try to compile under MS Vista 64 and I get this
error:

main.pas(132,13) Error: Function is already declared Public\Forward
"IsNa(const Double):Boolean;"

function declatarion are:
  function  IsNa(const val: extended): boolean; overload;
  function  IsNa(const val: double): boolean; overload;

and unit have {$mode objfpc} (in delphi mode is the same problem)

what happens ?

best regards
Tomek

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Function overloading under 32/64bit

Sven Barth
On 17.04.2011 14:36, [hidden email] wrote:

> I've a strange problem. My app compile (fpc 2.4.2) ok under Win32 and
> x64-Linux. Now I try to compile under MS Vista 64 and I get this
> error:
>
> main.pas(132,13) Error: Function is already declared Public\Forward
> "IsNa(const Double):Boolean;"
>
> function declatarion are:
>    function  IsNa(const val: extended): boolean; overload;
>    function  IsNa(const val: double): boolean; overload;
>
> and unit have {$mode objfpc} (in delphi mode is the same problem)
>
> what happens ?

At least for Win64 Extended is just an alias for Double, because there
you must not use the coprocessor that allows that precision.

I don't know whether this would work on Linux64 or any other 64-bit
target though.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Function overloading under 32/64bit

t.wieckowski
2011/4/17 Sven Barth <[hidden email]>:
>
> At least for Win64 Extended is just an alias for Double, because there you
> must not use the coprocessor that allows that precision.
>

Thanks.

best regards
Tomek

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus