Compiler Directives
In the $IFDEF example above, the TEMPOUT identifier is not defined, the $IFDEF evaluates to false and skips the code during compile. The code is never compiled.
Custom Compiler Directives
In addition to using the many built-in compiler directives, you can define your own. Here is a simple example.
{$Define MYDEBUGMODE}
{$IfDef MYDEBUGMODE}
MessageBox.Show("In debug mode.");
{$Else}
MessageBox.Show("Out of debug mode.");
{$EndIf}
{$UnDef MYDEBUGMODE}
{$IfDef MYDEBUGMODE}
MessageBox.Show("In debug mode.");
{$Else}
MessageBox.Show("Out of debug mode.");
{$EndIf}