两种方式使用版本编译指令:
1、{$IFDEF VER210}............{$ENDIF}
2、{$IF CompilerVersion>=18.5}//some code only compiled for Delphi 2007 and later{$IFEND}
http://delphi.wikia.com/wiki/Borland_Compiler_Conditional_Defines
Product Name | Version | Conditional Define |
---|---|---|
Embarcadero RAD Studio XE2 | 16.0 | VER230 |
Embarcadero RAD Studio XE | 15.0 | VER220 |
Embarcadero RAD Studio 2010 | 14.0 | VER210 |
CodeGear C++ Builder 2009 | 12.0 | VER200 |
CodeGear Delphi 2007 for .NET | 11.0 | VER190 |
CodeGear Delphi 2007 for Win32 | 11.0 | VER180 and VER185 |
Borland Developer Studio 2006 | 10.0 | VER180 |
Borland Delphi 2005 | 9.0 | VER170 |
Borland Delphi 8 for .NET | 8.0 | VER160 * |
C++BuilderX | ? | ? |
Borland C#Builder | 1.0 | VER160 * |
Borland Delphi 7 | 7.0 | VER150 |
Borland Kylix 3 | 3.0 | VER140 ** |
Borland C++Builder 6 | ? | VER140 ** |
Borland Kylix 2 | 2.0 | VER140 ** |
Borland Delphi 6 | 6.0 | VER140 ** |
Borland Kylix | 1.0 | VER140 ** |
Borland C++Builder 5 | ? | VER130 *** |
Borland Delphi 5 | 5.0 | VER130 *** |
Borland C++Builder 4 | ? | VER125 |
Borland Delphi 4 | 4.0 | VER120 |
Borland C++Builder 3 | ? | VER110 **** |
Borland Delphi 3 | 3.0 | VER100 |
Borland C++ 5 | ? | ? |
Borland C++Builder 1 | ? | VER93 |
Borland Delphi 2 | 2.0 | VER90 |
Borland C++ 4.5 | ? | ? |
Borland Delphi | 1.0 | VER80 |
Borland C++ 4 | ? | ? |
Borland Pascal 7 | 7.0 | VER70 |
Borland C++ 3.1 | ? | ? |
Turbo Pascal for Windows 1.5 | 1.5 | VER70 |
Turbo C++ for DOS 3 | ? | ? |
Borland C++ 3 | ? | ? |
Turbo C++ for Windows 3 (Win16) | ? | ? |
Turbo Pascal for Windows 1.0 | 1.0 | ??? |
Borland C++ 2 | ? | ? |
Turbo Pascal 6 | 6.0 | VER60 |
Turbo C++ for DOS | ? | ? |
Turbo C for DOS 2 | ? | ? |
Turbo Pascal 5.5 | 5.5 | VER55 |
Turbo C for DOS 1.5 | ? | ? |
Turbo Pascal 5 | 5.0 | VER50 |
Turbo Pascal 4 | 4.0 | VER40 |
Turbo C for DOS | ? | ? |
Turbo Pascal 3 | 3.0 | ??? |
Turbo Pascal 2 | 2.0 | ??? |
Turbo Pascal 1 | 1.0 | ??? |
* This conditional define is shared by the Delphi compilers used to build C#Builder 1 and Delphi 8, which do not natively support Delphi for Win32. This define is used in the "IDE Integration Packs" that were released to Borland partners in order to allow IDE plugins like ModelMaker Code Explorer (http://www.modelmakertools.com/code-explorer/index.html) and Castalia (http://www.delphi-expert.com/castalia3) to be compiled.
** This conditional define is shared between C++Builder 6, Delphi 6, Kylix 1, 2, and 3 (Checking for the conditional define "LINUX" helps to determine whether the compiler is Kylix or Delphi and "BCB" can be used to determine if C++Builder is being used).
*** This conditional define is shared with C++Builder 5
**** C++Builder 3.0 used VER110 (it had its own version of the Delphi compiler included).
For C++Builder and Turbo C++ and Turbo C release dates, see CppBuilder Release Dates...
Note: Version 13.0 never released