Is there a Delphi equivalent of the C# #if(DEBUG) compiler directive?
These control directives are available:
{$IFDEF}
{$ELSE}
{$ENDIF}
{$IFNDEF} //if *not* defined
and they can be used as shown here:
procedure TfrmMain.Button1Click(Sender: TObject);
begin
{$IFDEF MY_CONDITIONAL}
ShowMessage('my conditional IS defined!');
{$ELSE}
ShowMessage('my conditional is NOT defined!');
{$ENDIF}
{$IFNDEF MY_CONDITIONAL}
ShowMessage('My conditional is explicitly NOT defined');
{$ENDIF}
end;