Download CAM-postwriter User Manual

Transcript
User Manual
CAM-postwriter
Page:
Version:
Date:
38 of 1
3.1
17 April 2005
Execution stage.
At the time evaluation of the value of an expression takes place, all the operands in the expression must
have a value. A value can be assigned by initialization during declaration or by an earlier assignment in
the execution stage. When an operand is referenced without an initial value an error message is given.
When operators are equal in priority and "(" and ")" are omitted, evaluation of the expression takes place
from left to right. An exception on this rule are the operators "**" (power), NOT, + (plus sign) and (minus sign). Here evaluation from right to left takes place.
Examples:
expression
12 / 6 * 2
evaluation order
( 12 / 6 ) * 2 = 4
wrong evaluation order
12 / ( 6 * 2 ) = 1
4 ** 3 ** 2
4 ** ( 3 ** 2 ) = 262144
( 4 ** 3 ) ** 2 = 4096
not false or true
( not false ) or true = true
not ( false or true ) = false
Signaled compilation errors in an expression are:
"Too many expression items in an expression."
"Unknown operand in an expression."
"Type conflict in an expression."
"Unknown file identifier."
Date printed: 14 September 2005
Page 38