
Paramacros
Chapter 20
20-9
UnconditionalGOTO
Use the unconditional GOTO command to automatically transfer control
any time that the GOTO block is executed.
The format for the GOTO command is:
GOTO n;
Where: Specifies:
n the sequencenumber oftheblock towhich executionis transferredwhen the
GOTO blocki s executed.
Example 20.7
Un-conditional GOTO
N1...;
N2...;
N3GOTO5;
N4...;
N5...;
N6...;
/N7GOTO1;
In Example 20.7, execution continues sequentially until block N3 is read.
Execution then transfers to block N5 and again resumes sequential
execution to block N6. If optional block skip 1 is off, block N7 transfers
execution back to block N1.
Conditional IF-GOTO
The conditional IF-GOTO command is dependent on whether a
mathematical condition is true. If the condition is true, execution transfers
to the block specified.
Format for the IF-GOTO command is:
IF [(condition)] GOTO n;
Where: Specifies:
(condition) someconditional expression (seepage 20-7for details). This condition istested
bythecontrolto determineif itis trueorfalse.
n theblock towhichexecutionistransferredifthe conditionis tested astrue.
If the condition is tested as false, execution falls through the block and the
GOTO is not executed. Program execution continues in a normal fashion.
20.2.2
GOTO and IF-GOTO
Commands
Comentarios a estos manuales