Goto

Jumps to the specified label and continues execution.

Goto Label

Parameters

Label

The name of the label to which to jump. It must be written directly in the script and be known when the script is compiled.

Remarks

Variables, expressions and the function-call form Goto("Label") are not supported. Use the statement form goto Label. A missing target is reported while the script is being compiled.

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, Else, Blocks, Break, Continue

Examples

Jumps to the label named "MyLabel" and continues execution.

Goto MyLabel
; ...
MyLabel:
Sleep 100
; ...