DELPHI和BCB的版本定义宏全集
DELPHI的版本宏:
VER80 - Delphi 1
VER90 - Delphi 2
VER100 - Delphi 3
VER120 - Delphi 4
VER130 - Delphi 5
VER140 - Delphi 6
VER150 - Delphi 7
VER160 - Delphi 8
VER170 - Delphi 2005
VER180 - Delphi 2006
VER180 - Delphi 2007(兼容2006)
VER185 - Delphi 2007
BCB的版本宏:
VER93 - BCB 1
VER110 - BCB 3
VER125 - BCB 4
VER135 - BCB 5
VER145 - BCB 6
Kylix的版本宏:
VER140 - Kylix 1, Kylix 2
VER150 - Kylix 3
更老的Turbo Pascal版本宏:
VER40 - TP 4
VER50 - TP 5
VER55 - TP 5.5
VER60 - TP 6
VER10 - TPW 1
VER15 - TPW 1.5
VER70 - TP 7, BP 7, BP 7.01
最后附一段代码:
{$IFDEF VER130}
{$DEFINE DELPHI5}
{$DEFINE DELPHI}
{$ELSEIF VER135}
{$DEFINE BCB5}
{$DEFINE BCB}
{$ELSEIF VER140}
{$DEFINE DELPHI6}
{$DEFINE DELPHI}
{$DEFINE KYLIX1}
{$DEFINE KYLIX2}
{$DEFINE KYLIX}
{$ELSEIF VER145}
{$DEFINE BCB6}
{$DEFINE BCB}
{$ELSEIF VER150}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$DEFINE KYLIX3}
{$DEFINE KYLIX}
{$ELSEIF VER160}
{$DEFINE DELPHI8}
{$DEFINE DELPHI}
{$ELSEIF VER170}
{$DEFINE DELPHI2005}
{$DEFINE DELPHI}
{$ELSEIF VER180}
{$DEFINE DELPHI2006}
{$DEFINE DELPHI2007}
{$DEFINE DELPHI}
{$ELSEIF VER185}
{$DEFINE DELPHI2007}
{$DEFINE DELPHI}
{$IFEND}