Function and Procedure overloading in freePascal


Free Pascal supports function overloading. That is, you can define many functions with the same name, but with different arguments. For example:
procedure DoSomething (a : longint);
begin
{...}
end;
procedure DoSomething (a : real);
begin
{...}
end;
You can then call procedure DoSomething with an argument of type Longint or Real. This feature has the consequence that a previously declared function must always be defined with the header completely the same.