Posts

Showing posts with the label CompilerVersion

Delphi Compiler Version symbols or constants used with IFDEF - ENDIF

Image
If you plan on writing Delphi code that should work with several versions of the Delphi compiler then we first need to know under which versions our code gets compiled.  Suppose you are writing your own (commercial) custom component. Users of your component might have different Delphi versions than you have.  If they try to recompile the component's code - they might be in trouble! What if you were using default parameters in your  functions and the user has Delphi 3? These are symbols that can be used in $IFDEF /$ENDIF conditional compilation directives. {$IFDEF VER40}  - Turbo pascal 4 {$IFDEF VER50}  - Turbo pascal 5 {$IFDEF VER55}  - Turbo pascal 5.5 {$IFDEF VER60}  - Turbo pascal 6 {$IFDEF VER70}  - Borland pascal 7 (And turbo pascal 1.5 for windows) {$IFDEF VER80}  - Delphi 1 {$IFDEF VER90}  - Delphi 2 {$IFDEF VER100} - Delphi 3 {$IFDEF VER120} - Delphi 4 {$IFDEF VER130} - Delphi 5 {$IFDEF VER140} - ...