Next:
List of Tables
Up:
Free Pascal Programmers' manual
Previous:
Free Pascal Programmers' manual
Contents
Contents
List of Tables
About this document
1
. Compiler directives
1
.
1
Local directives
1
.
1
.
1
$A
or
$ALIGN
: Align Data
1
.
1
.
2
$ASMMODE
: Assembler mode
1
.
1
.
3
$B
or
$BOOLEVAL
: Complete boolean evaluation
1
.
1
.
4
$C
or
$ASSERTIONS
: Assertion support
1
.
1
.
5
$DEFINE
: Define a symbol
1
.
1
.
6
$ELSE
: Switch conditional compilation
1
.
1
.
7
$ENDIF
: End conditional compilation
1
.
1
.
8
$ERROR
: Generate error message
1
.
1
.
9
$F
: Far or near functions
1
.
1
.
10
$FATAL
: Generate fatal error message
1
.
1
.
11
$GOTO
: Support
Goto
and
Label
1
.
1
.
12
$H
or
$LONGSTRINGS
: Use AnsiStrings
1
.
1
.
13
$HINT
: Generate hint message
1
.
1
.
14
$HINTS
: Emit hints
1
.
1
.
15
$IF
: Start conditional compilation
1
.
1
.
16
$IFDEF Name
: Start conditional compilation
1
.
1
.
17
$IFNDEF
: Start conditional compilation
1
.
1
.
18
$IFOPT
: Start conditional compilation
1
.
1
.
19
$INFO
: Generate info message
1
.
1
.
20
$INLINE
: Allow inline code.
1
.
1
.
21
$I
or
$IOCHECKS
: Input/Output checking
1
.
1
.
22
$I
or
$INCLUDE
: Include file
1
.
1
.
23
$I
or
$INCLUDE
: Include compiler info
1
.
1
.
24
$I386_XXX
: Specify assembler format
1
.
1
.
25
$L
or
$LINK
: Link object file
1
.
1
.
26
$LINKLIB
: Link to a library
1
.
1
.
27
$M
or
$TYPEINFO
: Generate type info
1
.
1
.
28
$MACRO
: Allow use of macros.
1
.
1
.
29
$MAXFPUREGISTERS
: Maximum number of FPU registers for variables
1
.
1
.
30
$MESSAGE
: Generate info message
1
.
1
.
31
$MMX
: Intel MMX support
1
.
1
.
32
$NOTE
: Generate note message
1
.
1
.
33
$NOTES
: Emit notes
1
.
1
.
34
$OUTPUT_FORMAT
: Specify the output format
1
.
1
.
35
$P
or
$OPENSTRINGS
: Use open strings
1
.
1
.
36
$PACKENUM
: Minimum enumeration type size
1
.
1
.
37
$PACKRECORDS
: Alignment of record elements
1
.
1
.
38
$Q
$OVERFLOWCHECKS
: Overflow checking
1
.
1
.
39
$R
or
$RANGECHECKS
: Range checking
1
.
1
.
40
$SATURATION
: Saturation operations
1
.
1
.
41
$SMARTLINK
: Use smartlinking
1
.
1
.
42
$STATIC
: Allow use of
Static
keyword.
1
.
1
.
43
$STOP
: Generate fatal error message
1
.
1
.
44
$T
or
$TYPEDADDRESS
: Typed address operator (@)
1
.
1
.
45
$UNDEF
: Undefine a symbol
1
.
1
.
46
$V
or
$VARSTRINGCHECKS
: Var-string checking
1
.
1
.
47
$WAIT
: Wait for enter key press
1
.
1
.
48
$WARNING
: Generate warning message
1
.
1
.
49
$WARNINGS
: Emit warnings
1
.
1
.
50
$X
or
$EXTENDEDSYNTAX
: Extended syntax
1
.
2
Global directives
1
.
2
.
1
$APPTYPE
: Specify type of application (Win32 only)
1
.
2
.
2
$D
or
$DEBUGINFO
: Debugging symbols
1
.
2
.
3
$DESCRIPTION
1
.
2
.
4
$E
: Emulation of coprocessor
1
.
2
.
5
$G
: Generate 80286 code
1
.
2
.
6
$INCLUDEPATH
: Specify include path.
1
.
2
.
7
$L
or
$LOCALSYMBOLS
: Local symbol information
1
.
2
.
8
$LIBRARYPATH
: Specify library path.
1
.
2
.
9
$M
or
$MEMORY
: Memory sizes
1
.
2
.
10
$MODE
: Set compiler compatibility mode
1
.
2
.
11
$N
: Numeric processing
1
.
2
.
12
$O
: Overlay code generation
1
.
2
.
13
$OBJECTPATH
: Specify object path.
1
.
2
.
14
$S
: Stack checking
1
.
2
.
15
$UNITPATH
: Specify unit path.
1
.
2
.
16
$W
or
$STACKFRAMES
: Generate stackframes
1
.
2
.
17
$Y
or
$REFERENCEINFO
: Insert Browser information
2
. Using conditionals, messages and macros
2
.
1
Conditionals
2
.
2
Messages
2
.
3
Macros
3
. Using Assembly language
3
.
1
Intel syntax
3
.
2
AT&T Syntax
3
.
3
Calling mechanism
3
.
3
.
1
Ix86 calling conventions
3
.
3
.
2
M680x0 calling conventions
3
.
4
Signalling changed registers
3
.
5
Register Conventions
3
.
5
.
1
Intel x86 version
3
.
5
.
2
Motorola 680x0 version
4
. Linking issues
4
.
1
Using external functions or procedures
4
.
2
Using external variables
4
.
3
Linking to an object file
4
.
4
Linking to a library
4
.
5
Making libraries
4
.
5
.
1
Exporting functions
4
.
5
.
2
Exporting variables
4
.
5
.
3
Compiling libraries
4
.
5
.
4
Moving units into a library
4
.
5
.
5
Unit searching strategy
4
.
6
Using smart linking
5
. Objects
5
.
1
Constructor and Destructor calls
5
.
2
Memory storage of objects
5
.
3
The Virtual Method Table
6
. Generated code
6
.
1
Units
6
.
2
Programs
7
. Intel MMX support
7
.
1
What is it about ?
7
.
2
Saturation support
7
.
3
Restrictions of MMX support
7
.
4
Supported MMX operations
7
.
5
Optimizing MMX support
8
. Memory issues
8
.
1
The 32-bit model.
8
.
2
The stack
8
.
2
.
1
Intel x86 version
8
.
2
.
2
Motorola 680x0 version
8
.
3
The heap
8
.
3
.
1
The heap grows
8
.
3
.
2
Using Blocks
8
.
3
.
3
Using the split heap
8
.
3
.
4
Debugging the heap
8
.
3
.
5
Writing your own memory manager
8
.
4
Using
DOS
memory under the Go32 extender
9
. Resource strings
9
.
1
Introduction
9
.
2
The resource string file
9
.
3
Updating the string tables
9
.
4
GNU gettext
9
.
5
Caveat
10
. Optimizations
10
.
1
Non processor specific
10
.
1
.
1
Constant folding
10
.
1
.
2
Constant merging
10
.
1
.
3
Short cut evaluation
10
.
1
.
4
Constant set inlining
10
.
1
.
5
Small sets
10
.
1
.
6
Range checking
10
.
1
.
7
Shifts instead of multiply or divide
10
.
1
.
8
Automatic alignment
10
.
1
.
9
Smart linking
10
.
1
.
10
Inline routines
10
.
1
.
11
Case optimization
10
.
1
.
12
Stack frame omission
10
.
1
.
13
Register variables
10
.
1
.
14
Intel x86 specific
10
.
1
.
15
Motorola 680x0 specific
10
.
2
Optimization switches
10
.
3
Tips to get faster code
10
.
4
Floating point
10
.
4
.
1
Intel x86 specific
10
.
4
.
2
Motorola 680x0 specific
11
. Programming libraries
11
.
1
Introduction
11
.
2
Creating a library
11
.
3
Using a library in a pascal program
11
.
4
Using a pascal library from a C program
12
. Using Windows resources
12
.
1
The resource directive
$R
12
.
2
Creating resources
12
.
3
Using string tables.
12
.
4
Inserting version information
12
.
5
Inserting an application icon
12
.
6
Using a pascal preprocessor
A. Anatomy of a unit file
A.
1
Basics
A.
2
reading ppufiles
A.
3
The Header
A.
4
The sections
A.
5
Creating ppufiles
B. Compiler and RTL source tree structure
B.
1
The compiler source tree
B.
2
The RTL source tree
C. Compiler limits
D. Compiler modes
D.
1
FPC mode
D.
2
TP mode
D.
3
Delphi mode
D.
4
GPC mode
D.
5
OBJFPC mode
E. Using
fpcmake
E.
1
Introduction
E.
2
Usage
E.
3
Format of the configuration file
E.
3
.
1
Clean
E.
3
.
2
Defaults
E.
3
.
3
Dirs
E.
3
.
4
Info
E.
3
.
5
Install
E.
3
.
6
Libs
E.
3
.
7
Packages
E.
3
.
8
Postsettings
E.
3
.
9
Presettings
E.
3
.
10
Rules
E.
3
.
11
Sections
E.
3
.
12
Targets
E.
3
.
13
Tools
E.
3
.
14
Zip
E.
4
Programs needed to use the generated makefile
E.
5
Variables that affect the generated makefile
E.
5
.
1
Environment variables
E.
5
.
2
Directory variables
E.
5
.
3
Compiler command-line variables
E.
6
Variables set by
fpcmake
E.
6
.
1
Directory variables
E.
6
.
2
Target variables
E.
6
.
3
Compiler command-line variables
E.
6
.
4
Program names
E.
6
.
5
File extensions
E.
6
.
6
Target files
E.
7
Rules and targets created by
fpcmake
E.
7
.
1
Pattern rules
E.
7
.
2
Build rules
E.
7
.
3
Cleaning rules
E.
7
.
4
archiving rules
E.
7
.
5
Informative rules
F. Compiling the compiler yourself
F.
1
Introduction
F.
2
Before you begin
F.
3
Compiling using
make
F.
4
Compiling by hand
F.
4
.
1
Compiling the RTL
F.
4
.
2
Compiling the compiler
root
2000-12-20