Chapter 11
Using functions and procedures

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

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.

 .1Procedure declaration
 .2Function declaration
 .3Function results
 .4Parameter lists
  .4.1Value parameters
  .4.2Variable parameters
  .4.3Out parameters
  .4.4Constant parameters
  .4.5Open array parameters
  .4.6Array of const
 .5Function overloading
 .6Forward defined functions
 .7External functions
 .8Assembler functions
 .9Modifiers
  .9.1alias
  .9.2cdecl
  .9.3export
  .9.4inline
  .9.5interrupt
  .9.6local
  .9.7nostackframe
  .9.8overload
  .9.9pascal
  .9.10public
  .9.11register
  .9.12safecall
  .9.13saveregisters
  .9.14softfloat
  .9.15stdcall
  .9.16varargs
 .10Unsupported Turbo Pascal modifiers