Description


Whish to extend the possibilities of the preprocessor. 1) Use of real expressions in the #IF directive (not only \'equal\' operators) 2) A few more predefined constants ANSI C like __FILE__ __LINE__ __DATE__ __TIME__ __TIMESTAMP__ UnifAce specific _UNIFACE_ _UF_VER_ ...

Use Case


\"1) Use of expression in #IF 1a) #if (_UF_VER_ >= 9.0) $01 = $string(\"\"►,\"\") #else $01 = \"\"*\"\" #endif 1b) #define cLEN1=50 #define cLEN2=60 ... #if (cLEN1+cLEN2>100) #error Try to shorten the definitions #endif 2) New preprocessor constants 2a) The ANSI macros as describe in the standard __FILE__ : Name of the \"\"source\"\", where the line of code will be found __LINE__ : Linenumber in \"\"source\"\" __DATE__ , __TIME__, __TIMESTAMP__ : Date and time of compilation 2b) Uniface constants _UNIFACE_ : always 1 _UF_VER_ : version of the compiler as a number. : e.g 8.406 for version \"\"8.4.06\"\" and 9.301 for version \"\"9.3.01\"\"\"

Importance



Type


Scripting/Coding

Operating System


Not Applicable

Status


Open

Leave a Reply