Jumps to the specified label and continues execution.
Goto Label
Type: String
The name of the label to which to jump.
Label can be a variable or expression only if parentheses are used. For example, Goto MyLabel and Goto("MyLabel") both jump to MyLabel:.
A label written directly is checked when the script loads: it must belong to the same function, be in a block which encloses the Goto, and not be outside a Finally block the Goto is in. Performance is slightly reduced when using a dynamic label (that is, a variable or expression which returns a label name) because the target label must be "looked up" each time rather than only once when the script is first loaded. An error is thrown if the label does not exist or the Goto cannot reach it. To check whether the label exists, call IsLabel() beforehand. It does not check whether the Goto can reach the label. For example:
if IsLabel(VarContainingLabelName)
Goto(VarContainingLabelName)
The use of Goto is discouraged because it generally makes scripts less readable and harder to maintain. Consider using Else, Blocks, Break, and Continue as substitutes for Goto.
Return, IsLabel, Else, Blocks, Break, Continue