Chapter 10
Using functions and procedures

Free Pascal supports the use of functions and procedures, but with some extras: Function overloading is supported, as well as Const parameters and open arrays.

Remark: In many of the subsequent paragraphs the words procedure and function will be used interchangeably. The statements made are valid for both, except when indicated otherwise.


 10.1 Procedure declaration
 10.2 Function declaration
 10.3 Parameter lists
  10.3.1 Value parameters
  10.3.2 Variable parameters
  10.3.3 Out parameters
  10.3.4 Constant parameters
  10.3.5 Open array parameters
  10.3.6 Array of const
 10.4 Function overloading
 10.5 Forward dened functions
 10.6 External functions
 10.7 Assembler functions
 10.8 Modiers
  10.8.1 alias
  10.8.2 cdecl
  10.8.3 export
  10.8.4 inline
  10.8.5 interrupt
  10.8.6 pascal
  10.8.7 public
  10.8.8 register
  10.8.9 safecall
  10.8.10 softoat
  10.8.11 stdcall
  10.8.12 varargs
 10.9 Unsupported Turbo Pascal modiers