ID : 3521
Preprocessor Format
The format of preprocessor processing is different from normal PacScript.
In condition judgment designated in #If ... #Endif, basic operators, whether it is defined or not, defined macro and immediate data (literal) can be described.
In preprocessor operations, data other than integer type data cannot be processed. Double precision real number type data are automatically converted into integer type data by rounding to the nearest even number if the value is within the integer type range. String cannot be calculated.
Available formats
Format | Function |
---|---|
Defined macro | Can designate a defined macro. A functional macro can also be designated if it is in a form calculatable after expansion. Designating an undefined macro name will generate an error. |
Numeric value | Integer type data. Double precision real number type data are automatically converted into integer type data by rounding to the nearest even number. |
+ operator | Returns the sum of 2 numeric values. |
- operator | Returns the difference between numeric values or a sign-inverted numeric value. |
* operator | Returns the product of 2 numeric values. |
/ operator | Returns the quotient of 2 numeric values. Quotient is rounded to the nearest even number and automatically converted into integer type data. |
Comparative operators | Compares a left-hand expression and a right-hand expression, and then returns -1 if True or 0 if False. Comparison operation of string type data and position data are not allowed. |
And operator | Obtains logical AND of 2 expressions. |
Or operator | Obtains logical OR of 2 expressions. |
Not operator | Obtains logical NOT of expressions. |
Defined(macro name) | Returns -1 if the designated macro name is defined, or 0 if undefined. |
True, False, On, Off and Pi are not recognized as constants in preprocessor.
ID : 3521