NCT Group 99M Microscope & Magnifier User Manual


 
20 Custom Macro
189
20.13.5 Conditional Divergence: IF[<conditional expression>] GOTOn
If [<conditional expression>], put mandatorily between square brackets, is satisfied, the execution of
the program will be resumed at the block of the same program with sequence number n.
If [<conditional expression>], is not satisfied, the execution of the program will be resumed at the next
block.
Error message 3091ERRONEOUS OPERATION WITH # is returned unless IF is followed by a
conditional expression. If the conditional expression includes a syntactic error, error message 3064 BAD
MACRO STATEMENT will be returned.
20.13.6 Conditional Instruction: IF[<conditional expression>] - THEN
If [<conditional expression>], is satisfied, the instruction behind THEN will be executed.
If [<conditional expression>], is not satisfied, the execution of the program will be resumed at the next
block.
The word THEN can be omitted, the series of instructions
IF[<conditional expression>] instruction
will be equally executed.
20.13.7 Iteration: WHILE[<conditional expression>] Dom ... ENDm
As long as [<conditional expression>] is satisfied, the blocks following DOm up to block ENDm will
be repeatedly executed. In the instruction, the control will check wether the condition has been fulfilled;
if so, the program detail between DOm and ENDm will be executed; then, as a result of instruction
ENDm, the program will return to check the post-WHILE condition again.
Unless [<conditional expression>] is satisfied, the execution of the program will be resumed at the block
behind ENDm.
If WHILE [<conditional expression>] is omitted, i.e., the cycle is described by instructions DOm ...
ENDm, the program detail between DOm and ENDm will be executed for an indefinite (infinite) period
of time.
Possible values of m are 1, 2, 3. Error message 3091ERRONEOUS OPERATION WITH # will be
returned if any other value is specified. Error message 3091ERRONEOUS OPERATION WITH # is
returned unless WHILE is followed by a conditional expression. Error message 3064 BAD MACRO
STATEMENT will be returned if the conditional expression includes a syntactic error.
The rules of cycle organization:
– Instruction DOm has to be specified before instruction ENDm.
:
END1
:
: false (ERROR 72)
:
DO1