XenoGuard Documentation

GoTo

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.

Parameters:

The action has the following input parameters:


name Description

Label

Specifies the name of the label to jump to.

Allowed Context Scope
 [Local]

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: 

If
For Loop
For Each
While
Break
Label
Parallel
On Error Continue
On Error GoTo
Abort
Abort on Error