[Estimated Reading Time: < 1 minute]
Just a short post this one.
Somebody else may already have mentioned this, but I only just figured it out for myself – the CompilerVersion for the Delphi 2009 compiler is not what you might expect (and is not what the documentation says it is!).
Both CompilerVersion and RTLVersion have the value 20 in Delphi 2009.
In Delphi 2007 these were 18.5 and 18.0 respectively. Confusingly the documentation is correct for RTLVersion but incorrectly gives 18.0 as the value for CompilerVersion.
Is anyone else wondering what happened to 19?
Did Delphi 2008 happen after all and I just missed it?
Delphi 2007 should have been the 19. But to clarify that this was a special ‘non-breaking’ release that was changed to 18.5. But internally that was still the 19 and so they continued with the 20…
Yup, that’s a bug in the Delphi 2009 documentation.
I use the compiler defines instead of CompilerVersion and RTLVersion. I think they’re a little more straight forward.
http://delphi.wikia.com/wiki/Borland_Compiler_Conditional_Defines
Going by this, it looks like Delphi for .Net’s RTLVersion should have been 19, but it’s still 18.5, like with Win32.
Oops.
Delphi 2007 for .Net’s CompilerVersion and RTLVersion are both 19, as they should be.
Writeln(Format(‘RTLVersion: %n’, [RTLVersion]));
Writeln(Format(‘CompilerVersion: %n’, [CompilerVersion]));
{$IFDEF VER80}
WriteLn(‘VER80’);
{$ENDIF}
{$IFDEF VER90}
WriteLn(‘VER90’);
{$ENDIF}
{$IFDEF VER100}
WriteLn(‘VER100’);
{$ENDIF}
{$IFDEF VER120}
WriteLn(‘VER120’);
{$ENDIF}
{$IFDEF VER130}
WriteLn(‘VER130’);
{$ENDIF}
{$IFDEF VER140}
WriteLn(‘VER140’);
{$ENDIF}
{$IFDEF VER150}
WriteLn(‘VER150’);
{$ENDIF}
{$IFDEF VER160}
WriteLn(‘VER160’);
{$ENDIF}
{$IFDEF VER170}
WriteLn(‘VER170’);
{$ENDIF}
{$IFDEF VER180}
WriteLn(‘VER180’);
{$ENDIF}
{$IFDEF VER185}
WriteLn(‘VER185’);
{$ENDIF}
{$IFDEF VER190}
WriteLn(‘VER190’);
{$ENDIF}
{$IFDEF VER200}
WriteLn(‘VER200’);
{$ENDIF}
ReadLn;
Ah yes, Delphi.NET. That explains why CompilerVersion 19 passed me by entirely unnoticed.
🙂