{
VER10 : Turbo Pascal 1
VER20 : Turbo Pascal 2
VER30 : Turbo Pascal 3
VER40 : Turbo Pascal 4
VER50 : Turbo Pascal 5
VER60 : Turbo Pascal 6
VER70 : Turbo Pascal 7 / Borland Pascal 7
VER80 : Delphi 1
VER90 : Delphi 2
VER100 : Delphi 3
VER 120 Delphi 4
VER 130 Delphi 5
VER 140 Delphi 6
VER 150 Delphi 7
VER 170 Delphi 9 CodeGear2005
VER 180 Delphi 10 CodeGear 2006
VER 185 Delphi 11.0 (Spacely) CodeGear 2007
VER 190 Delphi 11.0 (Highlander)
VER 190 Delphi 12.0 (Tiburon) CodeGear 2009
VER 200 Delphi 12.0 CodeGear 2009
VER 210 Delphi 12.0 Embarcadero RAD Studio 2010
VER 125 Borland C++ Builder 4.0
VER 130 Borland C++ Builder 5.0
VER 140 Borland C++ Builder 6.0
VER 150 Borland C++ Builder 7.0
}
//下面是查看版本号的函数。
function GetDelphiVer:String;
begin
{$IFDEF VER110}
Result:=\'110\';
{$ENDIF}
{$IFDEF VER120}
Result:=\'120\';
{$ENDIF}
{$IFDEF VER130}
Result:=\'130\';
{$ENDIF}
{$IFDEF VER140}
Result:=\'140\';
{$ENDIF}
{$IFDEF VER150}
Result:=\'150\';
{$ENDIF}
{$IFDEF VER160}
Result:=\'160\';
{$ENDIF}
{$IFDEF VER170}
Result:=\'170\';
{$ENDIF}
{$IFDEF VER180}
Result:=\'180\';
{$ENDIF}
{$IFDEF VER185}
Result:=\'185\';
{$ENDIF}
{$IFDEF VER190}
Result:=\'190\';
{$ENDIF}
{$IFDEF VER200}
Result:=\'200\';
{$ENDIF}
{$IFDEF VER205}
Result:=\'205\';
{$ENDIF}
{$IFDEF VER210}
Result:=\'210\';
{$ENDIF}
{$IFDEF VER215}
Result:=\'215\';
{$ENDIF}
{$IFDEF VER220}
Result:=\'220\';
{$ENDIF}
end;
// 条件编译的版本定义
{$IFDEF ver120}
{$DEFINE Delphi4}
{$DEFINE Delphi4or5}
{$ENDIF}
{$IFDEF ver130}
{$DEFINE Delphi5}
{$DEFINE Delphi4or5}
{$ENDIF}
{$IFDEF ver140}
{$DEFINE Delphi6}
{$ENDIF}
{$IFDEF ver150}
{$DEFINE Delphi7}
{$ENDIF}
{$IFDEF ver170}
{$DEFINE Delphi2005}
{$ENDIF}
{$IFDEF ver180}
{$DEFINE Delphi2006}
{$ENDIF}
{$IFDEF ver185}
{$DEFINE Delphi2007}
{$ENDIF}
{$IFDEF ver200}
{$DEFINE Delphi2009}
{$ENDIF}
{$IFDEF ver210}
{$DEFINE Delphi2010}
{$ENDIF}
{$IFNDEF Delphi4or5}
{$DEFINE Delphi6AndUp}
{$IFNDEF Delphi6}
{$DEFINE Delphi7AndUp}
{$IFNDEF Delphi7}
{$DEFINE Delphi2005AndUp}
{$IFNDEF Delphi2005}
{$DEFINE Delphi2006AndUp}
{$IFNDEF Delphi2006}
{$DEFINE Delphi2007AndUp}
{$IFNDEF Delphi2007}
{$DEFINE Delphi2009AndUp}
{$IFNDEF Delphi2009}
{$DEFINE Delphi2010AndUp}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
VER10 : Turbo Pascal 1
VER20 : Turbo Pascal 2
VER30 : Turbo Pascal 3
VER40 : Turbo Pascal 4
VER50 : Turbo Pascal 5
VER60 : Turbo Pascal 6
VER70 : Turbo Pascal 7 / Borland Pascal 7
VER80 : Delphi 1
VER90 : Delphi 2
VER100 : Delphi 3
VER 120 Delphi 4
VER 130 Delphi 5
VER 140 Delphi 6
VER 150 Delphi 7
VER 170 Delphi 9 CodeGear2005
VER 180 Delphi 10 CodeGear 2006
VER 185 Delphi 11.0 (Spacely) CodeGear 2007
VER 190 Delphi 11.0 (Highlander)
VER 190 Delphi 12.0 (Tiburon) CodeGear 2009
VER 200 Delphi 12.0 CodeGear 2009
VER 210 Delphi 12.0 Embarcadero RAD Studio 2010
VER 125 Borland C++ Builder 4.0
VER 130 Borland C++ Builder 5.0
VER 140 Borland C++ Builder 6.0
VER 150 Borland C++ Builder 7.0
}
//下面是查看版本号的函数。
function GetDelphiVer:String;
begin
{$IFDEF VER110}
Result:=\'110\';
{$ENDIF}
{$IFDEF VER120}
Result:=\'120\';
{$ENDIF}
{$IFDEF VER130}
Result:=\'130\';
{$ENDIF}
{$IFDEF VER140}
Result:=\'140\';
{$ENDIF}
{$IFDEF VER150}
Result:=\'150\';
{$ENDIF}
{$IFDEF VER160}
Result:=\'160\';
{$ENDIF}
{$IFDEF VER170}
Result:=\'170\';
{$ENDIF}
{$IFDEF VER180}
Result:=\'180\';
{$ENDIF}
{$IFDEF VER185}
Result:=\'185\';
{$ENDIF}
{$IFDEF VER190}
Result:=\'190\';
{$ENDIF}
{$IFDEF VER200}
Result:=\'200\';
{$ENDIF}
{$IFDEF VER205}
Result:=\'205\';
{$ENDIF}
{$IFDEF VER210}
Result:=\'210\';
{$ENDIF}
{$IFDEF VER215}
Result:=\'215\';
{$ENDIF}
{$IFDEF VER220}
Result:=\'220\';
{$ENDIF}
end;
// 条件编译的版本定义
{$IFDEF ver120}
{$DEFINE Delphi4}
{$DEFINE Delphi4or5}
{$ENDIF}
{$IFDEF ver130}
{$DEFINE Delphi5}
{$DEFINE Delphi4or5}
{$ENDIF}
{$IFDEF ver140}
{$DEFINE Delphi6}
{$ENDIF}
{$IFDEF ver150}
{$DEFINE Delphi7}
{$ENDIF}
{$IFDEF ver170}
{$DEFINE Delphi2005}
{$ENDIF}
{$IFDEF ver180}
{$DEFINE Delphi2006}
{$ENDIF}
{$IFDEF ver185}
{$DEFINE Delphi2007}
{$ENDIF}
{$IFDEF ver200}
{$DEFINE Delphi2009}
{$ENDIF}
{$IFDEF ver210}
{$DEFINE Delphi2010}
{$ENDIF}
{$IFNDEF Delphi4or5}
{$DEFINE Delphi6AndUp}
{$IFNDEF Delphi6}
{$DEFINE Delphi7AndUp}
{$IFNDEF Delphi7}
{$DEFINE Delphi2005AndUp}
{$IFNDEF Delphi2005}
{$DEFINE Delphi2006AndUp}
{$IFNDEF Delphi2006}
{$DEFINE Delphi2007AndUp}
{$IFNDEF Delphi2007}
{$DEFINE Delphi2009AndUp}
{$IFNDEF Delphi2009}
{$DEFINE Delphi2010AndUp}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}