XenoGuard 4.0 Documentation


ActionStep Reference » Programming » Flow Control » GoTo 

The GoTo ActionStep jumps to a specified label and executes the ActionSteps that follow the label. The sequential execution of ActionSteps 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 ActionStep.


The ActionStep has the following input parameters:

name Description


Specifies the name of the label to jump to.

Allowed Context Scope

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

Example 1 (Execute the ActionSteps 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 ActionSteps: 

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