Description
Transfers control from one statement in a script to another statement that is labeled.
Syntax
GOTO label
Parameter |
Description |
---|---|
label |
The label associated with the statement to which you want to transfer control. A label is an identifier followed by a colon (such as OK:). Do not use the colon with a label in the GOTO statement. |
Examples
Example 1
This GOTO statement skips over the Taxable=FALSE line:
Goto NextStep Taxable=FALSE //This statement never executes. NextStep: Rate=Count/Count4
Example 2
This GOTO statement transfers control to the statement associated with the label OK:
GOTO OK . . . OK: . . .