> The $IF and $ELSEIF directives are terminated with $IFEND, unlike other conditional directives that use the $ENDIF terminator. <

> The $IF and $ELSEIF directives are terminated with $IFEND, unlike other conditional directives that use the $ENDIF terminator. <

OK

System.Classes.pas of Delphi 10.2, Line 1637 (TThread declaration):

{$IF Defined(MSWINDOWS)}
FHandle: THandle platform;
{$ELSEIF Defined(POSIX)}
FCreateSuspendedMutex: pthread_mutex_t;
FInitialSuspendDone: Boolean;
{$ENDIF POSIX}

WTF?

http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Legacy_IFEND_(Delphi)

> At the XE4 release, the Delphi compilers were changed to accept either $IFEND or $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 $IF and $IFDEF statements. <

WTFF?
Why?

No wonder that refactoring is unstable.
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/IF_directive_(Delphi)

Comments

  1. I always force the old IFEND behaviour as many of the tooling (including built-in) fails on the new behaviour.

    I'm not even going to think about the why, same as for the 0-based stuff.

    ReplyDelete

Post a Comment