Operators | Definitions | |||||
+ | - | Uniary Plus or Minus, Logical Not | ||||
** | Exponentiation | |||||
* | / | Multiplication and Division | ||||
+ | - | Addition and Subtraction | ||||
// | String Concatenation | |||||
< | > | <= | >= | == | != | Relational Operators |
|| | && | Logical Or, Logical And | ||||
+= | -= | = | Increment, Decrement, Assignment | |||
Operators | Operands | Result | ||||||
** | * | / | + | - | += | -= | I,R | I,R |
// | S | S | ||||||
< | > | <= | >= | I,R,S | L | |||
== | != | I,R,S,L,W | L | |||||
= | I,R,S,L,W | I,R,S,L,W | ||||||
|| | && | L | L | |||||
Note: | Expressions with a mixture of INTEGER and REAL data types are valid and will be converted to the assigned data type. Real to integer conversion truncates the fraction. All arithmetic expression evaluations are done in single precision. |
IVAL += 4 * SIND( MYANGLE ) | IVAL is incremented by the integer value resulting from the calculation of (4 x sin(MYANGLE) and the truncation of all digits after the decimal point. |
MYFUNC( ) >= (A+1)*2 && STR1 // STR2 == “TESTING” | Test for MYFUNC( ) greater or equal to (A+1)*2 and the concatenation of STR1 with STR2 logically equal to the string “TESTING”. |
IF ( b**2 > 4.0 * a * c && ABS(a) >= 1.0E-7) THENroot(1) = ( -b + SQRT( b**2 - 4.0 * a * c )) / (2.0*a)
root(2) = ( -b - SQRT( b**2 - 4.0 * a * c )) / (2.0*a)
END IF
“ABC” == “ABC”“ABC” == “abc”“TEST” == “TEST”“HELLO” < “help”“hello” < “HELP”