What is the compiler version for Delphi 2010?

Viewed 20759

In Delphi 2010, if I want to do this:

{$IFDEF VER999}
//some delphi 2010-specific code here
{$ENDIF}

What version # do I need to use in place of "999"?

5 Answers

Along the same lines as Jason's comment if you are creating code that needs to run in current and older versions of Delphi you might want to do something like:

{$IF CompilerVersion > 18.5} 
   //Delphi 2009 or higher
   //Unicode version of code
{$ELSE}
   //Delphi 2007 and earlier
   //NON-Unicode version of code
{$IFEND}
Related