Compiler Version

The specific define for the Delphi 2009 compiler is VER200. If you need to have specific code for one of the recent versions of Delphi, you can base your $IFDEF statements on the following defines:

D2006 VER180

  1. Win32 VER185 and VER180
  2. Net VER190

Delphi 2009 VER200

As usual, you can also use the internal versioning constants in $IF statements, with the advantage of being able to use >= rather than a specific match. The versioning constants are called CompilerVersion and RTLVersion and in Delphi 2009 they are assigned to the floating-point value 20.00.

Below is a code snippet with the tests based on define and one of the constants, extracted from the MinorLang project:

{$IFDEF VER200}

ShowMessage ( 'Delphi 2009 or newer'); {$IFEND}

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment