[next] [prev] [prev-tail] [tail] [up]

## Chapter 14
Using functions and procedures

Free Pascal supports the use of functions and procedures. It supports

- Function overloading, i.e. functions with the same name but different parameter lists.
- Const parameters.
- Open arrays (i.e. arrays without bounds).
- Variable number of arguments as in C.
- Return-like construct as in C, through the Exit keyword.

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.

14.1 Procedure declaration
14.2 Function declaration
14.3 Function results
14.4 Parameter lists
14.4.1 Value parameters
14.4.2 Variable parameters
14.4.3 Out parameters
14.4.4 Constant parameters
14.4.5 Open array parameters
14.4.6 Array of const
14.5 Function overloading
14.6 Forward declared functions
14.7 External functions
14.8 Assembler functions
14.9 Modifiers
14.9.1 alias
14.9.2 cdecl
14.9.3 export
14.9.4 inline
14.9.5 interrupt
14.9.6 iocheck
14.9.7 local
14.9.8 noreturn
14.9.9 nostackframe
14.9.10 overload
14.9.11 pascal
14.9.12 public
14.9.13 register
14.9.14 safecall
14.9.15 saveregisters
14.9.16 softfloat
14.9.17 stdcall
14.9.18 varargs
14.10 Unsupported Turbo Pascal modifiers

[next] [prev] [prev-tail] [front] [up]