Difference between revisions of "local compiler directives"
From Free Pascal wiki
Jump to navigationJump to searchJwdietrich (talk | contribs) (Unnecessary hint removed.) |
Jwdietrich (talk | contribs) (Remaining paragraphs translated.) |
||
Line 53: | Line 53: | ||
==Conditional compilation== | ==Conditional compilation== | ||
− | *[[sElse/de|$ELSE]] defines alternative path in conditional compilation | + | *[[sElse/de|$ELSE]] defines alternative path in conditional compilation. |
− | *[[sElseIf/de|$ELSEIF]] defines alternative and new branch conditional compilation | + | *[[sElseIf/de|$ELSEIF]] defines alternative and new branch conditional compilation. |
− | *[[sEndif/de|$ENDIF]] defines end of conditional compilation | + | *[[sEndif/de|$ENDIF]] defines end of conditional compilation. |
− | *[[sIf/de|$IF]] Begin of conditional compilation | + | *[[sIf/de|$IF]] Begin of conditional compilation. |
− | *[[sIfdef/de|$IFDEF]] Begin of conditional compilation | + | *[[sIfdef/de|$IFDEF]] Begin of conditional compilation. |
− | *[[sIfndef/de|$IFNDEF]] Begin of conditional compilation | + | *[[sIfndef/de|$IFNDEF]] Begin of conditional compilation. |
− | *[[sIfopt/de|$IFOPT]] Begin of conditional compilation | + | *[[sIfopt/de|$IFOPT]] Begin of conditional compilation. |
==Self-defined compiler warnings, messages and hints== | ==Self-defined compiler warnings, messages and hints== | ||
Line 66: | Line 66: | ||
*[[sHint/de|$HINT]] displays a self-defined hint. | *[[sHint/de|$HINT]] displays a self-defined hint. | ||
*[[sHints/de|$HINTS]] enables self-defined hints. | *[[sHints/de|$HINTS]] enables self-defined hints. | ||
− | *[[sInfo/de|$INFO]] display a self-defined information message | + | *[[sInfo/de|$INFO]] display a self-defined information message. |
− | *[[sMessage/de|$MESSAGE]] creates a self-defined information message | + | *[[sMessage/de|$MESSAGE]] creates a self-defined information message. |
− | *[[sNote/de|$NOTE]] creates a self-defined note | + | *[[sNote/de|$NOTE]] creates a self-defined note. |
− | *[[sNotes/de|$NOTES]] enables the creation of self-defined notes | + | *[[sNotes/de|$NOTES]] enables the creation of self-defined notes. |
− | *[[sStop/de|$STOP]] display a self-defined fatal error message | + | *[[sStop/de|$STOP]] display a self-defined fatal error message. |
− | *[[sWarning/de|$WARNING]] creates a self-defined warning | + | *[[sWarning/de|$WARNING]] creates a self-defined warning. |
*[[sWarnings/de|$WARNINGS]] enables self-defined warnings. | *[[sWarnings/de|$WARNINGS]] enables self-defined warnings. | ||
− | + | ==Local compiler direvtives for x86 processors only== | |
+ | *[[sAsmmode/de|$ASMMODE]] assembler mode. | ||
+ | *[[sI386xxx/de|$I386_XXX]] determines the assembler format. | ||
+ | *[[sMmx/de|$MMX]] enables optimizations for MMX processores. | ||
+ | *[[sSaturation/de|$SATURATION]] Enables saturation (protection from memory-overflow) for MMX processores. | ||
+ | *[[sMaxfpuregisters/de|$MAXFPUREGISTERS]] determines the maximum number of floating-points registers to use. | ||
− | == | + | ==Local compiler direvtives for Darwin-based operating systems only== |
− | *[[ | + | *[[sLinkframework/de|$LINKFRAMEWORK]] inserts Framework. |
− | |||
− | |||
− | |||
− | |||
− | == | + | ==Local compiler direvtives for MacPas mode only== |
− | *[[ | + | The following directives are supported for compatibility with existing Pascal compilers for Mac OS: |
+ | *[[sAlign/de|$A and $ALIGN]] determines the alignment of data in records. | ||
+ | *[[sErrorc/de|$ERRORC]] returns an error message. | ||
+ | *[[sOv/de|$Q or $OV]] monitor overflow of integer variables. | ||
− | == | + | ==Symbols== |
− | + | *[[sDefinec/de|$DEFINEC]] enables definition of own symbols. | |
− | + | *[[sSetc/de|$SETC]] defines and assigns a symbol. | |
− | + | *[[sUndefc/de|$UNDEFC]] undefines and unassigns a symbol. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | *[[sDefinec/de|$DEFINEC]] | ||
− | *[[sSetc/de|$SETC]] | ||
− | *[[sUndefc/de|$UNDEFC]] | ||
[[Category: Compiler directives]] | [[Category: Compiler directives]] |
Revision as of 14:56, 21 September 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.