I have a unit I wrote in Delphi 7 some time ago, and have just had the fun (pain) of converting to Delphi XE (Unicode).
The Unit works fine after some trouble, I am now trying to make this unit compatible with different Delphi Versions should I ever need to switch IDE back to Delphi 7 whilst updating some other code.
I only have Delphi 7 and Delphi XE, but from what I gather code written in Delphi 1 to Delphi 2007 will compile, but code from Delphi 2009 and above will be Unicode.
...Anyway, in the Unit I am separating the non-unicode and unicode like so:
{$IFDEF VER150} //Delphi 7
// code
{$ELSE IFDEF VER220} //Delphi XE
// code
{$ENDIF}
How do I modify the compiler directive so the rules apply to multi versions? For example something like:
{$IFDEF VER80,  //D1
        VER90,  //D2
        VER100, //D3
        VER120, //D4
        VER130, //D5
        VER140, //D6
        VER150, //D7}
This would then cover all Delphi versions should I distribute the source or .dcu unit.
Thanks.
 
    