XenoGuard Documentation


Actions » Programming » Flow Control » GoTo 

The GoTo action jumps to a specified label and executes the actions that follow the label. The sequential execution of actions is interrupted with this because GoTo continues at another position in the script.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Flow Control node, select the GoTo action.


The action has the following input parameters:

name Description


Specifies the name of the label to jump to.

Allowed Context Scope

Information This action is useful in escaping deeply nested loops or iterations such as For Loop and While.

Example 1 (Execute the actions of a designated label):

In this example the value of two local variables named numValue1 and numValue2 is compared, which use floating point as data type. Depending on the result of the If comparison, two different labels are jumped to and a text is displayed via Message Box.

Example 2 (Exit a nested loop with GoTo and Label):

In this example, the contents of two local variables named numValue1 and numValue2 are compared in a loop, both of floating point data type. The outer and inner loop sequences are executed as long as the conditions are True. But as soon as the condition of the If branch is fulfilled, the script jumps to a specified label and outputs a text via Message Box.

See other flow control actions: 

For Loop
For Each
On Error Continue
On Error GoTo
Abort on Error