Name
$DefinitionInfo Compiler Directive
Syntax
{$YD} // default {$DefinitionInfo On} // default {$Y+} {$Y-} {$DefinitionInfo Off}
Scope
File
Description
By default, the compiler records information about the definition of each symbol—type, variable, and subroutine—in a unit. The project browser and code explorer in the IDE let you browse and examine that information, peruse the symbols in a unit, or jump straight to the definition of a symbol.
With $DefinitionInfo
off, you cannot use the browser or
code explorer, but compile times and .dcu file
sizes are reduced slightly. Definition information has no impact on
the performance or size of the final .exe or
.dll file.
The $DefinitionInfo
and
$ReferenceInfo
directives define three possible
states of browser information. The $Y
directive
provides a shortcut for the three states:
The
$YD
directive is equivalent to enabling definitions and disabling references. This is the default.The
$Y+
directive is equivalent to enabling definitions and references.The
$Y-
directive is equivalent to disabling definitions and references.You cannot enable references without also enabling definitions, so there is no fourth state.
In order to use definition info, you must also enable the
$DebugInfo
and
$LocalSymbols
compiler directives.
See Also
$DebugInfo Compiler Directive, $LocalSymbols Compiler Directive, $ReferenceInfo Compiler Directive |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.