How do you (compile-time) detect the difference between Alexandria 11.2 and 11.3 (or, rather, how do you detect you are at 11.3 or later?)
Both have CompilerVersion and RTLVersion value at 35.
How do you (compile-time) detect the difference between Alexandria 11.2 and 11.3 (or, rather, how do you detect you are at 11.3 or later?)
Both have CompilerVersion and RTLVersion value at 35.
There are constants RTLVersion111
, RTLVersion112
and RTLVersion113
declared depending on the version you are compiling with. These can be detected like this:
{$IF declared(RTLVersion113)}
...
{$IFEND}
Extended Answer, based on Uwe Raabe's answer:
{$IF CompilerVersion > 35 }
{$DEFINE Alexandria3 }
{$ELSEIF CompilerVersion < 35 }
{$UNDEF Alexandria3 }
{$ELSEIF Declared(RTLVersion113) }
{$DEFINE Alexandria3 }
{$ELSE }
{$UNDEF Alexandria3 }
{$ENDIF }
Now you can
{$IFDEF Alexandria3 }
to conditionally compile code for Alexandria3 or later.