Kbase P93259: Preprocessor can't be changed at run time.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  18/11/2009 |
|
Status: Verified
SYMPTOM(s):
Preprocessor can't be changed at run time.
Preprocessor always reverts to the same value.
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
This is expected behavior.
Preprocessor directives apply at compile time. More precisely, they are parsed before the actual compilation occurs.
They cannot be influenced by run time conditions as the code will already be compiled by the time those conditions are evaluated.
FIX:
If the conditions to set the preprocessor are known at compile time, the &IF ... &THEN preprocessor can be used.
Otherwise, the appropriate code needs to be written to either handle the conditions entirely at run time, or to implement compile-on-the-fly techniques.