NCT Group 99M, 2000M manual Conditional Divergence IFconditional expression GOTOn

Models: 2000M 99M

1 206
Download 206 pages 27.56 Kb
Page 189
Image 189

20 Custom Macro

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. Ifthe conditionalexpressionincludes 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.7Iteration: 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 [<conditionalexpression>] 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 DOmand 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

 

189

Page 189
Image 189
NCT Group 99M Conditional Divergence IFconditional expression GOTOn, Conditional Instruction IFconditional expression then