IFOPT directive (Delphi)
Go Up to Delphi Compiler Directives (List) Index
Type
Conditional compilation
Syntax
{$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:
{$IFOPT R+} Writeln('Compiled with range-checking'); {$ENDIF}
The Writeln statement compiles if the $R option is currently active.
$IfOpt can be used multiple times in your code.
Long directives support
The following section lists all the supported long directives that have no short directive counterpart.
| Long Directive | Options |
|---|---|
|
|
ON or OFF |
|
|
ON or OFF |
|
|
0, 1, 2, 4, 8, 16 |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON, OFF, or AUTO |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
<op>: one of the following symbols: =, <>, < >, <=, >= {$IFOPT SETOSVERSION>=6.0}
|
|
|
IntConst |
|
|
IntConst |
|
|
<op>: one of the following symbols: =, <>, < >, <=, >= {$IFOPT SETSUBVERSION>=9.2}
|
|
|
<op>: one of the following symbols: =, <>, < >, <=, >= {$IFOPT SETUSERVERSION<=5.}
|
|
|
ON or OFF |
|
|
NATIVE, CR, LF, CRLF |
|
{{code|{$IFOPT TSAWARE |
ON or OFF |
|
|
OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON, OFF, or ERROR |
|
|
ON, OFF, or ERROR |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |
|
|
ON or OFF |