[fpc-devel]function overloading resolution order question

David Butler david at e.co.za
Sat Nov 8 05:02:48 CET 2003


Hi

How does FreePascal resolve ambigious calls to overloaded functions?

For example, if we have two procedures:

procedure Test(const X: Integer); overload;
procedure Test(const X: Extended); overload;

If a call is made to Test(1), the procedure with the Integer parameter
is called.

When we have:

procedure Test(const X: Word); overload;
procedure Test(const X: Extended); overload;

and a call is made to Test(1), the procedure with the Extended
parameter is called.

Regards
David





More information about the fpc-devel mailing list