LET var,(expression1),op,(expression2)....
Arithmetic expressions are evaluated and the result is put in var. Arithmetic operators (op) permitted in expressions are:
+ add - subtract * multiply / divide
and the operands can be integer, packed or float, variable or constants Operator precedence is NOT obeyed: evaluation follows its order, from left to right; use parentheses to change this order. Parentheses cannot be nested.
expressions can be :
a single variable (of the same type of var) (parentheses are unnecessary) a constant (of the same type of var) (parentheses are unnecessary) an expression enclosed in parentheses, that is in the form (var1,op,var2), where vars can be variables or constantsThere are some limits in the use of this instruction:
no operator precedence is considered: reckons are done in the order in which are written parentheses are used to modify the order of calculation only one level of parentheses are permitted (no nesting of expressions is permitted) all the variable must me of the same numeric type numeric type permitted are integer (F or H), packed (P) or Float (D) divide (/) between integer is always an integer (result is truncated to an integer value) no virtual decimal point is considered for packed
Parameter Name Mode Type coding Remark 1 var Output numeric F or H or P or D Result of computation 2 expression1 Input numeric expression 3 operator Input fixed symbol can be +, -, *, / 4 expression2 Input numeric expression up to 20 parameters
Back | Start | Next |
PTR2PTR | Top | INC |