I am trying to add a compile statement in Clarion 10.0.12799 and it does not generate the code. The message is not displayed in the Clarion 10 compiled program. I would like the code to be compiled in Clarion 10, but not in Clarion 11. Do I have the syntax wrong?
message('this compiles only in C10')
What may work for you also would be the below OMIT. It would also compile is versions < 10 like 9 and 8 so that is different than your CwVer=10. This may be desirable that code is for C10 and before. This is more of an issue with Class writers supporting with all versions since C8.
OMIT('***C10PDF***', _C110_) !was Compile(, _CWVER_=10000)
Message('this compiles only in C10 and C9 C8, but not C11 C12 ...')
In C10 the C11 symbol _C110_ would be be Undefined. OMIT’s rules say that Undefined Symbols are assumed to be Zero.
The OMIT directive executes only if the expression is true. Therefore, the code between OMIT and the terminator is compiled only if the expression is not true. If the expression contains an EQUATE that has not yet been defined, then the referenced EQUATE is assumed to be zero (0).