IFOPT directive (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Directives (List) Index


Conditional compilation


{$IFOPT switch}

The $IfOpt compiler directive is a meta-directive, which means that it tests for the positive (+) or negative (-) state of a single character compiler directive.

For example:

   Writeln('Compiled with range-checking');

The Writeln statement compiles if the $R option is currently active.

Note: $IfOpt can be used multiple times in your code.