NCT Group 99M Microscope & Magnifier User Manual


 
20 Custom Macro
188
Complex Arithmetic Operations - Sequence of Execution
The above-mentioned arithmetic operations and functions can be combined. The sequence of executing
the operations, or the precedence rule is function - multiplicative operations - additive operations.
For example,
Modifying the Sequence of execution
The sequence of executing the operations can be modified by the use of brackets [ and ]. Brackets can
be nested in 5 levels. The control will return error message 3064 BAD MACRO STATEMENT if a
depth over 5 levels is found in the program.
Example of brackets nested in 3 levels:
The numbers refer to the sequence of executing the operations. Clearly, the above-mentioned rule of
precedence is applicable to the sequence of executing the operations at a given level of brackets.
20.13.3 Logical Operations
The programming language uses the following logical operations:
equal to #i EQ #j
not equal to #i NE #j
greater than #i GT #j
less than #i LT #j
greater than or equal to #i GE #j
less than or equal to #i LE #j
The variables on both sides of a logical operation can be substituted by formula as well. The above
conditional expressions can be used in divergence or iteration instructions IF or WHILE.
L Note: Since the above conditional expressions are followed by additions and subtractions, the
possible errors must be taken into account in respect of the accuracy of decision.
20.13.4 Unconditional Divergence: GOTOn
As a result of instruction GOTOn, the execution of the program will be resumed unconditionally at the
block of the same program with sequence number n. Sequence number n can be substituted for by a
variable or a formula. The number of the block, to which the jump is made by instruction GOTO must
be put at the beginning of the block. Unless the selected block number is found, error message 3070
NOT EXISTING BLOCK NO. P will be returned.
#110 = #111 + #112 * COS #113
1
2 Sequence of operations
3
#120 = COS [ [ [#121 - #122] * #123 + #125] * #126]
1
2
3
4
5