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

The function-call form Goto("Label") is not supported. A missing label is reported when the script is 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
; ...