Chapter 8
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.


 8.1 Procedure declaration
 8.2 Function declaration
 8.3 Parameter lists
   Value parameters
   Variable parameters
   Constant parameters
   Open array parameters
   Array of const
 8.4 Function overloading
 8.5 Forward defined functions
 8.6 External functions
 8.7 Assembler functions
 8.8 Modifiers
   alias
   cdecl
   export
   inline
   interrupt
   pascal
   popstack
   public
   register
   saveregisters
   safecall
   stdcall
 8.9 Unsupported Turbo Pascal modifiers