How to determine the Delphi compiler version using IFDEF statements.
{$IFDEF VER80}
{$DEFINE Delphi1}
{$ENDIF}
{$IFDEF VER90}
{$DEFINE Delphi2}
{$ENDIF}
{$IFDEF VER93}
{$DEFINE BCB1}
{$ENDIF}
{$IFDEF VER100}
{$DEFINE Delphi3}
{$ENDIF}
{$IFDEF VER110}
{$DEFINE BCB3}
{$ENDIF}
{$IFDEF VER120}
{$DEFINE Delphi4}
{$ENDIF}
{$IFDEF VER125}
{$DEFINE BCB4}
{$ENDIF}
{$IFDEF VER130}
{$DEFINE Delphi5}
{$ENDIF}