Here we give a list of things which are possible in Free Pascal, but which didn’t exist in Turbo Pascal or Delphi.
The example above would work with TP, but the compiler would assume that the a>4 is a recursive call. If a recursive call is actually what is desired, you must append () after the function name:
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:
This construction will generate a compiler error, because the compiler didn’t find a definition of procedure x (v : longint);. Instead you should define your procedure x as:
The command line option -So (see page 115) disables overloading. When you use it, the above will compile, as in Turbo Pascal.