Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

Function overloading under 32/64bit

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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

Reply by email

Sven Barth
to Unknown author
Show quoted text 14 lines
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

Reply by email