|
$Evallocal |
Top Previous Next |
|
This evaluates a numerical expression at compile time and places it into a local control variable. In turn one can use $ife to do numeric testing on the value of this variable.
The format is $EvalLocal expression
The expression must consist of constants, functions or other control variables with numerical values. Example: $set znumber 4 $EvalLocal anumber %znumber%+10 $ife %anumber%>14 display "it exceeds 14" "%anumber%" $ife %anumber%<14 display "it is less than 14" "%anumber%" $ife %anumber%=14 display "it equals 14" "%anumber%" $ife %anumber%<>14 display "it does not equal 14" "%anumber%" Notes:
$Eval that works with local control variables $Evalglobal that works with global control variables
OR XOR EQV IMP AND NOT < <= = <> >= > LE LE EQ NE GE GT + - binary and unary * / ^ **
abs ceil cos exp floor frac IfThen log log2 log10 max min mod PI power round sign sin sleep sqr sqrt tan trunk
|