Difference between revisions of "local compiler directives"
From Free Pascal wiki
Jump to navigationJump to searchJwdietrich (talk | contribs) (Links corrected.) |
|||
Line 56: | Line 56: | ||
*[[sElseIf|$ELSEIF]] defines alternative and new branch conditional compilation. | *[[sElseIf|$ELSEIF]] defines alternative and new branch conditional compilation. | ||
*[[sEndif|$ENDIF]] defines end of conditional compilation. | *[[sEndif|$ENDIF]] defines end of conditional compilation. | ||
− | *[[ | + | *[[$IF]] Begin of conditional compilation. |
*[[sIfdef|$IFDEF]] Begin of conditional compilation. | *[[sIfdef|$IFDEF]] Begin of conditional compilation. | ||
*[[sIfndef|$IFNDEF]] Begin of conditional compilation. | *[[sIfndef|$IFNDEF]] Begin of conditional compilation. |
Revision as of 00:01, 14 October 2013
│
Deutsch (de) │
English (en) │
français (fr) │
Local directives may be used more then once in a unit or program.
Local compiler direvtives
- $A and $ALIGN determines the of alignment of data in records.
- $A1, $A2,$A4 and $A8 determines the of alignment of data in records. Has the same effect as the directive $PACKRECORDS.
- $B or $BOOLEVAL enables short-cut evaluation of boolean values.
- $C or $ASSERTIONS supports debugging.
- $BITPACKING enables bit-wise packing of records.
- $CALLING determines calling-convention of routines.
- $CHECKPOINTER checks validity of pointers.
- $CODEALIGN determines the code-aligning in memory.
- $COPERATORS enables usage of operatores similar to conventions in the C language.
- $DEFINE or $DEFINEC enables definition of own symbols.
- $EXTENDEDSYM ignored by compiler.
- $F ignored by compiler.
- $FPUTYPE compiles according to FPU type
- $GOTO enables Goto and Label
- $H or $LONGSTRINGS determines string type for reserved word string.
- $HPPEMIT ignored by compiler.
- $IMPLICITEXCEPTIONS helps to avoid memory leaks.
- $INLINE copies procedures to the place, where they have been called from.
- $INTERFACES determines interface type.
- $I or $IOCHECKS enables checking of input/output.
- $I or $INCLUDE includes file in compilation.
- $I or $INCLUDE included certein compiler information.
- $J or $WRITEABLECONST enables run-time assigning of values to typed constants.
- $L or $LINK inserts object file during linking.
- $LINKLIB inserts library during linking.
- $M or $TYPEINFO creates RTTI
- $MACRO enables usage of macros.
- $MINENUMSIZE for Delphi-compatibility, see $PACKENUM or $Z
- $MINFPCONSTPREC sets minimum accuracy of floating point operations.
- $NODEFINE ignored by compiler.
- $OBJECTCHECKS checks usage of pointer to self.
- $OPTIMIZATION switches on certain optimizations.
- $OUTPUT_FORMAT determines output format of object file.
- $PACKENUM or $Z enables packing of compiler enumerations.
- $PACKRECORDS determines alignment of records in memory.
- $PACKSET determines packing of sets.
- $POP recreates saved compiler settings.
- $PUSH saves current compiler settings.
- $OVERFLOWCHECKS checkes integer variables for overflow.
- $R or $RANGECHECKS checks overflow of index in compound variables.
- $R or $RESOURCE inserts resource file.
- $STATIC enable usage of the reserved word static.
- $T or $TYPEDADDRESS determines, if the address operator @ delivers a typed or untyped pointer.
- $UNDEF undefines symbol.
- $V or $VARSTRINGCHECKS enables checking of assignments to string variables.
- $W or $STACKFRAMES determines conditions for the creation of stack frames.
- $WAIT waits with execution until the enter key has been pressed.
Conditional compilation
- $ELSE defines alternative path in conditional compilation.
- $ELSEIF defines alternative and new branch conditional compilation.
- $ENDIF defines end of conditional compilation.
- $IF Begin of conditional compilation.
- $IFDEF Begin of conditional compilation.
- $IFNDEF Begin of conditional compilation.
- $IFOPT Begin of conditional compilation.
Self-defined compiler warnings, messages and hints
- $ERROR display a self-defined error message.
- $FATAL display a self-defined fatal error message.
- $HINT displays a self-defined hint.
- $HINTS enables self-defined hints.
- $INFO display a self-defined information message.
- $MESSAGE creates a self-defined information message.
- $NOTE creates a self-defined note.
- $NOTES enables the creation of self-defined notes.
- $STOP display a self-defined fatal error message.
- $WARNING creates a self-defined warning.
- $WARNINGS enables self-defined warnings.
Local compiler direvtives for x86 processors only
- $ASMMODE assembler mode.
- $I386_XXX determines the assembler format.
- $MMX enables optimizations for MMX processores.
- $SATURATION Enables saturation (protection from memory-overflow) for MMX processores.
- $MAXFPUREGISTERS determines the maximum number of floating-points registers to use.
Local compiler direvtives for Darwin-based operating systems only
- $LINKFRAMEWORK inserts Framework.
Local compiler direvtives for MacPas mode only
The following directives are supported for compatibility with existing Pascal compilers for Mac OS:
- $A and $ALIGN determines the alignment of data in records.
- $ERRORC returns an error message.
- $Q or $OV monitor overflow of integer variables.