Goto

A GOTO statement moves to a specific location within a calculation. The location has been named with a label. (See Assignment Statements for more information.)

Syntax

GoTo Location

Parameter

Description

Location

Specify the location you want to go to. For instance, enter the name of a section on a form.

A GOTO statement must begin with the keyword GOTO.

Example

Here is an example:

GOTO SECTION_ONE:

The control jumps to SECTION_ONE in a calculation.

The destination label can occur anywhere in the script containing the GOTO statement. If the label cannot be located in the script, a syntax error will be generated.

GOTO will support retrieving the label from a target variable.

Here is another example:

SECTION = "MY_LABEL:"

GOTO SECTION

Since the word following the GOTO statement does not contain a colon, the program will assume the label is contained in the target variable named. In this case, control will jump to the location of MY_LABEL in the current script.

See also