Free Pascal :
Reference guide.


_____________________________________________________________________
Reference guide for Free Pascal, version 2.0.2
Document version 2.0
November 2005

Michaël Van Canneyt

____________________________________________________________________________
Contents
List of Tables
 About this guide
  Notations
  Syntax diagrams
1 Pascal Tokens
 1.1 Symbols
 1.2 Comments
 1.3 Reserved words
  1.3.1 Turbo Pascal reserved words
  1.3.2 Delphi reserved words
  1.3.3 Free Pascal reserved words
  1.3.4 Modiers
 1.4 Identiers
 1.5 Numbers
 1.6 Labels
 1.7 Character strings
2 Constants
 2.1 Ordinary constants
 2.2 Typed constants
 2.3 Resource strings
3 Types
 3.1 Base types
  3.1.1 Ordinal types
  3.1.2 Real types
 3.2 Character types
  3.2.1 Char
  3.2.2 Strings
  3.2.3 Short strings
  3.2.4 Ansistrings
  3.2.5 WideStrings
  3.2.6 Constant strings
  3.2.7 PChar - Null terminated strings
 3.3 Structured Types
  3.3.1 Arrays
  3.3.2 Record types
  3.3.3 Set types
  3.3.4 File types
 3.4 Pointers
 3.5 Forward type declarations
 3.6 Procedural types
 3.7 Variant types
  3.7.1 Denition
  3.7.2 Variants in assignments and expressions
  3.7.3 Variants and interfaces
4 Variables
 4.1 Denition
 4.2 Declaration
 4.3 Scope
 4.4 Thread Variables
 4.5 Properties
5 Objects
 5.1 Declaration
 5.2 Fields
 5.3 Constructors and destructors
 5.4 Methods
 5.5 Method invocation
 5.6 Visibility
6 Classes
 6.1 Class denitions
 6.2 Class instantiation
 6.3 Methods
  6.3.1 invocation
  6.3.2 Virtual methods
  6.3.3 Class methods
  6.3.4 Message methods
 6.4 Properties
7 Interfaces
 7.1 Denition
 7.2 Interface identication: A GUID
 7.3 Interfaces and COM
 Interface implementations
 7.4 CORBA and other Interfaces
8 Expressions
 8.1 Expression syntax
 8.2 Function calls
 8.3 Set constructors
 8.4 Value typecasts
 8.5 The @ operator
 8.6 Operators
  8.6.1 Arithmetic operators
  8.6.2 Logical operators
  8.6.3 Boolean operators
  8.6.4 String operators
  8.6.5 Set operators
  8.6.6 Relational operators
9 Statements
 9.1 Simple statements
  9.1.1 Assignments
  9.1.2 Procedure statements
  9.1.3 Goto statements
 9.2 Structured statements
  9.2.1 Compound statements
  9.2.2 The Case statement
  9.2.3 The If..then..else statement
  9.2.4 The For..to/downto..do statement
  9.2.5 The Repeat..until statement
  9.2.6 The While..do statement
  9.2.7 The With statement
  9.2.8 Exception Statements
 9.3 Assembler statements
10 Using functions and procedures
 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
11 Operator overloading
 11.1 Introduction
 11.2 Operator declarations
 11.3 Assignment operators
 11.4 Arithmetic operators
 11.5 Comparision operator
12 Programs, units, blocks
 12.1 Programs
 12.2 Units
 12.3 Blocks
 12.4 Scope
  12.4.1 Block scope
  12.4.2 Record scope
  12.4.3 Class scope
  12.4.4 Unit scope
 12.5 Libraries
13 Exceptions
 13.1 The raise statement
 13.2 The try...except statement
 13.3 The try...nally statement
 13.4 Exception handling nesting
 13.5 Exception classes
14 Using assembler
 14.1 Assembler statements
 14.2 Assembler procedures and functions