Главная страница | назад





Article #17302: Conditional defines for all Delphi versions

 Question and Answer Database

FAQ2302D.txt - Conditional defines for all Delphi versions

Category   :Compiler
Platform   :All-32Bit
Product    :All32Bit,   

Question:
What are the conditional defines for Delphi 

Answer:
Delphi defines the following standard conditional symbols.

VER80 - Delphi 1.x
VER90 - Delphi 2.x
VER93 - CBuilder 1.0
VER100 - Delphi 3.x


For example the following would compile in the correct uses 
statement in Delphi 2 and Delphi 3 respectively. 

{$IFDEF VER90} 
uses system, windows, oleaut; 
{$ENDIF}

{$IFDEF VER100}
uses system, windows, comobj; 
{$ENDIF}

The version numbers for Delphi 1, 2 and 3 correspond to 
version 8.0, 9.0 and 10.0 of the Object Pascal compiler. For 
additional information on conditional compiles and compiler 
directives see appendix B in the Delphi 3 users guide.

4/2/99 12:10:06 PM
 

Last Modified: 01-SEP-99