next up previous contents
Next: Using conditionalsMessages and Up: Compiler directives Previous: Local directives

Global directives

  Global directives affect the whole of the compilation process. That is why they also have a command - line counterpart. The command-line counterpart is given for each of the directives.

$D or $DEBUGINFO: Debugging symbols

When this switch is on ({$DEBUGINFO ON}), the compiler inserts GNU debugging information in the executable. The effect of this switch is the same as the command-line switch -g. By default, insertion of debugging information is off.

$E : Emulation of coprocessor

This directive controls the emulation of the coprocessor. There is no command-line counterpart for this directive.

Intel x86 version

When this switch is enabled, all floating point instructions which are not supported by standard coprocessor emulators will give out a warning.

The compiler itself doesn't do the emulation of the coprocessor.

To use coprocessor emulation under DOS go32v1 there is nothing special required, as it is handled automatically. (As of version 0.99.10, the go32v1 platform will no longer be supported)

To use coprocessor emulation under DOS go32v2 you must use the emu387 unit, which contains correct initialization code for the emulator.

Under LINUX, the kernel takes care of the coprocessor support.

Motorola 680x0 version

When the switch is on, no floating point opcodes are emitted by the code generator. Instead, internal run-time library routines are called to do the necessary calculations. In this case all real types are mapped to the single IEEE floating point type.

Remark : By default, emulation is on. It is possible to intermix emulation code with real floating point opcodes, as long as the only type used is single or real.

$G : Generate 80286 code

This option is recognised for Turbo Pascal compatibility, but is ignored,

$L or $LOCALSYMBOLS: Local symbol information

This switch (not to be confused with the {$L file} file linking directive) is recognised for Turbo Pascal compatibility, but is ignored. generation of symbol information is controlled by the $D switch.

$M or $MEMORY: Memory sizes

This switch can be used to set the heap and stacksize. It's format is as follows:

{$M StackSize,HeapSize}
Wher StackSize and HeapSize should be two integer values, greater than 1024. The first number sets the size of the stack, and the second the size of the heap. (Stack setting is ignored under LINUX). The two numbers can be set on the command line using the -Ch (and -Cs switches.

$N : Numeric processing

This switch is recognised for Turbo Pascal compatibility, but is otherwise ignored, since the compiler always uses the coprocessor for floating point mathematics.

$O : Overlay code generation

This switch is recognised for Turbo Pascal compatibility, but is otherwise ignored.

$S : Stack checking

The {$S+} directive tells the compiler to generate stack checking code. This generates code to check if a stack overflow occurred, i.e. to see whether the stack has grown beyond its maximally allowed size. If the stack grows beyond the maximum size, then a run-time error is generated, and the program will exit with exit code 202.

Specifying {$S-} will turn generation of stack-checking code off.

The command-line compiler switch -Ct has the same effect as the {$S+} directive.

$W or $STACKFRAMES : Generate stackframes

The {$W} switch directove controls the generation of stackframes. In the on state ({$STACKFRAMES ON}), the compiler will generate a stackframe for every procedure or function.

In the off state, the compiler will omit the generation of a stackframe if the following conditions are satisfied:

If these conditions are satisfied, the stack frame will be omitted.

$Y or $REFERENCEINFO : Insert Browser information

This switch controls the generation of browser inforation. It is recognized for compatibility with Turbo Pascal and Delphi only, as Browser information generation is not yet fully supported.


next up previous contents
Next: Using conditionalsMessages and Up: Compiler directives Previous: Local directives

Michael Van Canneyt
Thu Sep 10 14:04:11 CEST 1998