Local compiler directives

This is an old revision of Local compiler directives, edited by Trev at . The current revision is 93462.

Added see also; fixed typos

Local compiler directives may be used more than once in a Pascal source code file.

Syntax

Data layout

Code generation

Platform-specific

For x86 processors only

Other

Data inclusion

Compile-time context

Conditional compilation

Conditional compilation can be achieved via the directives

Additionally, in {$mode MacPas} the directives

are allowed, too.

Compile-time behavior

With {$wait}, the compiler waits till the user hits ↵ Enter, and then resumes compilation.

Self-defined messages can be triggered with the directives:

Emission of messages can be controlled via the directives:

Ignored

Since FPC intends to be sort of compatible to some other compilers, some very common compiler directives stemming from the non-FPC-lands are recognized – not generating an illegal directive error – and ignored. Those are:

See also

Directives, definitions and conditionals definitions
global compiler directives • local compiler directives Conditional Compiler Options • Conditional compilation • Macros and Conditionals • Platform defines $IF