Is there a way in Delphi 2009 to have a section of code conditionally compiled based on a compiler directive. Specifically, I'd like to have code in place that is only included if the range-check compiler directive is turned on.
Something like this:
{$ifdef RANGECHECKINGISON} [do range checking code here] {$endif}
Use {$ifopt}
instead of {$ifdef}
:
{$ifopt R+} // if range checking is active
...
{$endif}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With