The {$ENDIF} directive ends the conditional compilation initiated by the last {$IFxxx} directive. Any text after the ENDIF keyword but before the closing brace is ignored:
{$ENDIF some ignored text}
|
is the same as
{$ENDIF}
|
This is useful for indication what switch is meant to be ended.