You are not logged in.
Hi AB
please enhance SynCommons.pas with VER300 - define
function GetDelphiCompilerVersion: RawUTF8;
begin
result :=
{$ifdef FPC}
'Free Pascal'
{$ifdef VER2_6_4}+' 2.6.4'{$endif}
{$ifdef VER2_7_0}+' 2.7.0'{$endif}
{$ifdef VER2_7_1}+' 2.7.1'{$endif}
{$ifdef VER3_0_1}+' 3.0.1'{$endif}
{$ifdef VER3_1_1}+' 3.1.1'{$endif}
{$else}
{$ifdef VER130} 'Delphi 5'{$endif}
{$ifdef CONDITIONALEXPRESSIONS} // Delphi 6 or newer
{$if defined(KYLIX3)}'Kylix 3'
{$elseif defined(VER140)}'Delphi 6'
{$elseif defined(VER150)}'Delphi 7'
{$elseif defined(VER160)}'Delphi 8'
{$elseif defined(VER170)}'Delphi 2005'
{$elseif defined(VER185)}'Delphi 2007'
{$elseif defined(VER180)}'Delphi 2006'
{$elseif defined(VER200)}'Delphi 2009'
{$elseif defined(VER210)}'Delphi 2010'
{$elseif defined(VER220)}'Delphi XE'
{$elseif defined(VER230)}'Delphi XE2'
{$elseif defined(VER240)}'Delphi XE3'
{$elseif defined(VER250)}'Delphi XE4'
{$elseif defined(VER260)}'Delphi XE5'
{$elseif defined(VER265)}'AppMethod 1'
{$elseif defined(VER270)}'Delphi XE6'
{$elseif defined(VER280)}'Delphi XE7'
{$elseif defined(VER290)}'Delphi XE8'
{$elseif defined(VER300)}'Delphi XE9'
{$ifend}
{$endif CONDITIONALEXPRESSIONS}
{$endif}
{$ifdef CPU64}
+' 64 bit'
{$endif}
end;
Rad Studio 12.1 Santorini
Offline
Delphi XE9, already?
OK - let's introduce it http://synopse.info/fossil/info/08e8eb8c7b
Offline
Would it not be better to use
{$if compilerversion >= xxx}
that way you're not hung up on the exact compiler version.
Offline