Hello. I have an .inc file which contains
Hello. I have an .inc file which contains
...
{$IF (CompilerVersion >= 14)} {$DEFINE Delphi6} {$DEFINE Delphi6up} {$IFEND}
{$IF (CompilerVersion >= 15)} {$UNDEF Delphi6} {$DEFINE Delphi7} {$DEFINE Delphi7up} {$IFEND}
...
Delphi 7 compiler gives an error "constant expression expected". What am I missing here?
Thank you.
...
{$IF (CompilerVersion >= 14)} {$DEFINE Delphi6} {$DEFINE Delphi6up} {$IFEND}
{$IF (CompilerVersion >= 15)} {$UNDEF Delphi6} {$DEFINE Delphi7} {$DEFINE Delphi7up} {$IFEND}
...
Delphi 7 compiler gives an error "constant expression expected". What am I missing here?
Thank you.
If memory serves, the VERXXX goes back to D1, and it's likely it always works. CompilerVersion is apparently a defined constant, and was /supposedly/ introduced in D6.
ReplyDeleteBill Meyer
ReplyDeleteVERxxx even goes back to Turbo Pascal I think
:)
Stefan Meisner I think you are correct in that. All the more reason to use it rather than CompilerVersion.
ReplyDelete