GOTO
ANSI
The GOTO instruction alters the program execution sequence by branching to a location designated by a Program Execution Label. The instruction uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A Program Execution Label to which program control is transferred.
flag
Required. One of the condition, pseudo condition or function Flags that determines whether the GOTO will occur.
expression
Required. An Expression that, if true, causes a branch to the specified label.
Flags Affected: Function Key
Note the following:
{label} designates the Program Execution Label to which the program execution diverts.
Function Flags (Function keys) are cleared if tested and found TRUE. All other Flags remain unchanged.
If a FILEPI instruction is active, the FILEPI count is not decremented by this instruction.
Format (2) branches to {label} only if the {flag} is as specified, set or not set (FALSE). Otherwise, execution continues with the next sequential instruction.
Format (3) branches to {label} only if {expression} evaluates to a true condition. Otherwise, execution continues with the next sequential instruction.
See Also: Example Code, CALL, Expressions, Program Control Instructions
![]() |