Macro expressions
When you define macros with the help of The define command and in The ifdef command, you can use simple expressions with constants and macros. Operands must be of the same type except for logical operations && and ||. It is possible to use parentheses to specify the order of calculating the expression.
Operation | Type of operands | Type of result |
Arithmetic operators | ||
+ | int uint long ulong float double | int uint long ulong float double |
- | int uint long ulong float double | int uint long ulong float double |
* | int uint long ulong float double | int uint long ulong float double |
/ | int uint long ulong float double | int uint long ulong float double |
Bit operators | ||
& | int uint long ulong | int uint long ulong |
| | int uint long ulong | int uint long ulong |
^ | int uint long ulong | int uint long ulong |
Logical operators | ||
&& | int uint long ulong float double str(1 if the length >0) buf(1 if the length >0) | int uint |
|| | int uint long ulong float double str(1 if the length >0) buf(1 if the length >0) | int uint |
Comparison operators | ||
== | int uint long ulong float double str buf | int uint |
!= | int uint long ulong float double str buf | int uint |
>= | int uint long ulong float double | int uint |
<= | int uint long ulong float double | int uint |
> | int uint long ulong float double | int uint |
< | int uint long ulong float double | int uint |
Unary operators | ||
+ | int uint long ulong float double | int uint long ulong float double |
- | int uint long ulong float double | int long float double |
~ | int uint long ulong | int uint long ulong |
! | int uint long ulong float double str(1 if the length >0) buf(1 if the length >0) | int uint |
7 + $YEAR - 2000
2.3 * ( VAL1 - $VAL0 / 2.0 )
$VALFLAG | 0xff00
$MODE1 || ( $MODE2 == 3 && $COMPILE == "WINDOWS" )
$PROGNAME != "My Application" && $PROG != "Debug"