SmartPascal
$ReferenceInfo
Compiler Directive
Determines whether symbol reference information is built
1   {$ReferenceInfo Off}
2   {$ReferenceInfo On}
Description
The $ReferenceInfo compiler directive determines whether Delphi builds symbol reference information, as used by the Delphi browser and code explorer.
 
This gives not only symbol definitions, but also usage of these symbols.
 
The overheads for keeping $ReferenceInfo on are minimal.
 
$DefinitionInfo only works when $DebugInfo and LocalSymbols are On.
Notes
$DefinitionInfo works in conjunction with $ReferenceInfo when the related $Y directive is used:

$YD = Defs On , Refs Off
$Y-  = Defs Off , Refs Off
$Y+ = Defs On , Refs On

The default value is $ReferenceInfo Off

You must have symbol definitions on in order to have references to the symbols.
Related commands
$DebugInfo Determines whether application debug information is built
$DefinitionInfo Determines whether application symbol information is built
$LocalSymbols Determines what application debug information is built
 
Example code :