Legacy IFEND (Object Pascal)
Require $IFEND to close $IF statements
Allows you to require the
$IFEND directive in order to close the associated
$IF statement in your code.
At the XE4 release, the Object Pascal compilers were changed to accept either
$ENDIF to close
$IF statements. Before XE4, only
$IFEND could be used to close
$IF statements. The
$LEGACYIFEND directive allows you to restore the old behavior, which is useful if your code is emitting E2029 related to nested
You can also set the
$LEGACYIFEND compiler directive as follows:
- Using the the
- Setting the Require $IF to be terminated by $IFEND option on the Project > Options > Object Pascal Compiler > Compiling page.