Local symbol information (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Directives (List) Index

Type

Switch

Syntax

{$L+} or {$L-} {$LOCALSYMBOLS ON} or {$LOCALSYMBOLS OFF}

Default

{$L+} {$LOCALSYMBOLS ON}

Scope

Global



Remarks

The $L switch directive enables or disables the generation of local symbol information. Local symbol information consists of the names and types of all local variables and constants in a module, that is, the symbols in the module's implementation part and the symbols within the module's procedures and functions.

For units, the local symbol information is recorded in the unit file along with the unit's object code. Local symbol information increases the size of unit files and takes up additional memory when compiling programs that use the unit, but it does not affect the size or speed of the executable program.

When a program or unit is compiled in the {$L+} state, the integrated debugger lets you examine and modify the module's local variables. Furthermore, calls to the module's procedures and functions can be examined via the View|Call Stack.

The $L switch is usually used in conjunction with the $D switch, which enables and disables the generation of line-number tables for debugging. The $L directive is ignored if the compiler is in the {$D-} state.

See Also