{ Compiler Settings }

{$B-} // Complete Boolean Evaluation Off
{$R-} // Range Checking Off
{$Q-} // Overflow Checking Off
{$V-} // Var String Checking Off
{$T-} // Typed @ operator Off
{$X+} // Extended Syntax On
{$P+} // Open String Params On
{$O+} // Optimization On
{$IFDEF WIN32}
{$H+} // Use long strings by default
{$ENDIF}

{ Assume the latest version of compiler is available }

{$DEFINE COMPILER2010_UP}
{$DEFINE COMPILER2009_UP}
{$DEFINE COMPILER2007_UP}
{$DEFINE COMPILER2006_UP}
{$DEFINE COMPILER2005_UP}
{$DEFINE COMPILER7_UP}
{$DEFINE COMPILER6_UP}
{$DEFINE COMPILER5_UP}
{$DEFINE COMPILER4_UP}
{$DEFINE COMPILER3_UP}
{$DEFINE COMPILER2_UP}

{ Then detect if it is older (.NET versions are ignored) }

{$IFDEF VER210}           // Delphi 2010

{$ENDIF}

{$IFDEF VER200}           // Delphi 2009
  {$UNDEF COMPILER2010_UP}
{$ENDIF}

{$IFDEF VER185}           // Delphi 2007
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
{$ENDIF}

{$IFDEF VER180}           // Delphi 2006
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
{$ENDIF}

{$IFDEF VER170}           // Delphi 2005
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
{$ENDIF}

{$IFDEF VER150}           // Delphi 7
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
{$ENDIF}

{$IFDEF VER140}           // Delphi 6 & C++Builder 6
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
{$ENDIF}

{$IFDEF VER130}           // Delphi 5 & C++Builder 5
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
{$ENDIF}

{$IFDEF VER130}           // Delphi 5 & C++Builder 5
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
{$ENDIF}

{$IFDEF VER125}          // C++Builder 4
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
{$ENDIF}

{$IFDEF VER120}          // Delphi 4
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
{$ENDIF}

{$IFDEF VER110}          // C++Builder 3
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
  {$UNDEF COMPILER4_UP}
{$ENDIF}

{$IFDEF VER100}          // Delphi 3
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
  {$UNDEF COMPILER4_UP}
{$ENDIF}

{$IFDEF VER93}          // C++Builder 1
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
  {$UNDEF COMPILER4_UP}
{$ENDIF}

{$IFDEF VER90}          // Delphi 2
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
  {$UNDEF COMPILER4_UP}
  {$UNDEF COMPILER3_UP}
{$ENDIF}

{$IFDEF VER80}          // Delphi 1
  {$UNDEF COMPILER2010_UP}
  {$UNDEF COMPILER2009_UP}
  {$UNDEF COMPILER2007_UP}
  {$UNDEF COMPILER2006_UP}
  {$UNDEF COMPILER2005_UP}
  {$UNDEF COMPILER7_UP}
  {$UNDEF COMPILER6_UP}
  {$UNDEF COMPILER5_UP}
  {$UNDEF COMPILER4_UP}
  {$UNDEF COMPILER3_UP}
  {$UNDEF COMPILER2_UP}
{$ENDIF}


{$IFDEF COMPILER2010_UP}
  {$INLINE AUTO}
{$ELSE}
  {$IFDEF COMPILER2009_UP}
    {$INLINE ON}
  {$ENDIF}
{$ENDIF}
