Free Pascal :
Reference guide.


_____________________________________________________________________
Reference guide for Free Pascal, version 1.0.8
Document version 1.9
May 2003

Michaël Van Canneyt

____________________________________________________________________________
Contents
List of Tables
 About this guide
  Notations
  Syntax diagrams
The Pascal language
1 Pascal Tokens
 1.1 Symbols
 1.2 Comments
 1.3 Reserved words
   Turbo Pascal reserved words
   Delphi reserved words
   Free Pascal reserved words
   Modifiers
 1.4 Identifiers
 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
   Ordinal types
   Real types
 3.2 Character types
   Char
   Strings
   Short strings
   Ansistrings
   Constant strings
   PChar - Null terminated strings
 3.3 Structured Types
   Arrays
   Record types
   Set types
   File types
 3.4 Pointers
 3.5 Forward type declarations
 3.6 Procedural types
4 Objects
 4.1 Declaration
 4.2 Fields
 4.3 Constructors and destructors
 4.4 Methods
 4.5 Method invocation
 4.6 Visibility
5 Classes
 5.1 Class definitions
 5.2 Class instantiation
 5.3 Methods
   invocation
   Virtual methods
   Message methods
 5.4 Properties
6 Expressions
 6.1 Expression syntax
 6.2 Function calls
 6.3 Set constructors
 6.4 Value typecasts
 6.5 The @ operator
 6.6 Operators
   Arithmetic operators
   Logical operators
   Boolean operators
   String operators
   Set operators
   Relational operators
7 Statements
 7.1 Simple statements
   Assignments
   Procedure statements
   Goto statements
 7.2 Structured statements
   Compound statements
   The Case statement
   The If..then..else statement
   The For..to/downto..do statement
   The Repeat..until statement
   The While..do statement
   The With statement
   Exception Statements
 7.3 Assembler statements
8 Using functions and procedures
 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
9 Operator overloading
 9.1 Introduction
 9.2 Operator declarations
 9.3 Assignment operators
 9.4 Arithmetic operators
 9.5 Comparision operator
10 Programs, units, blocks
 10.1 Programs
 10.2 Units
 10.3 Blocks
 10.4 Scope
   Block scope
   Record scope
   Class scope
   Unit scope
 10.5 Libraries
11 Exceptions
 11.1 The raise statement
 11.2 The try...except statement
 11.3 The try...finally statement
 11.4 Exception handling nesting
 11.5 Exception classes
12 Using assembler
 12.1 Assembler statements
 12.2 Assembler procedures and functions
Reference : The System unit
13 The system unit
 13.1 Types, Constants and Variables
   Types
   Constants
   Variables
 13.2 Function list by category
   File handling
   Memory management
   Mathematical routines
   String handling
   Operating System functions
   Miscellaneous functions
 13.3 Functions and Procedures
   Abs
   Addr
   Append
   Arctan
   Assert
   Assign
   Assigned
   BinStr
   Blockread
   Blockwrite
   Break
   Chdir
   Chr
   Close
   CompareByte
   CompareChar
   CompareDWord
   CompareWord
   Concat
   Continue
   Copy
   Cos
   CSeg
   Dec
   Delete
   Dispose
   DSeg
   Eof
   Eoln
   Erase
   Exclude
   Exit
   Exp
   Filepos
   Filesize
   FillByte
   Fillchar
   FillDWord
   Fillword
   Flush
   Frac
   Freemem
   Getdir
   Getmem
   GetMemoryManager
   Halt
   HexStr
   Hi
   High
   Inc
   Include
   IndexByte
   IndexChar
   IndexDWord
   IndexWord
   Insert
   IsMemoryManagerSet
   Int
   IOresult
   Length
   Ln
   Lo
   LongJmp
   Low
   Lowercase
   Mark
   Maxavail
   Memavail
   Mkdir
   Move
   MoveChar0
   New
   Odd
   OctStr
   Ofs
   Ord
   Paramcount
   Paramstr
   Pi
   Pos
   Power
   Pred
   Ptr
   Random
   Randomize
   Read
   Readln
   Real2Double
   Release
   Rename
   Reset
   Rewrite
   Rmdir
   Round
   Runerror
   Seek
   SeekEof
   SeekEoln
   Seg
   SetMemoryManager
   SetJmp
   SetLength
   SetString
   SetTextBuf
   Sin
   SizeOf
   Sptr
   Sqr
   Sqrt
   SSeg
   Str
   StringOfChar
   Succ
   Swap
   Trunc
   Truncate
   Upcase
   Val
   Write
   WriteLn
14 The OBJPAS unit
 14.1 Types
 14.2 Functions and Procedures
   AssignFile
   CloseFile
   Freemem
   Getmem
   GetResourceStringCurrentValue
   GetResourceStringDefaultValue
   GetResourceStringHash
   GetResourceStringName
   Hash
   Paramstr
   ReAllocMem
   ResetResourceTables
   ResourceStringCount
   ResourceStringTableCount
   SetResourceStrings
   SetResourceStringValue