
Command Reference
117382-A Rev. A 2-11
goto
The goto command lets you specify the next line to be executed from the script
file. Within the script file, the
goto command is used with a label. A label begins
and ends with a colon (:), consists of up to 15 alphanumeric characters and the
underscore character (_), and must be on its own line, beginning in column 1.
Syntax
The goto command has the following syntax:
goto :
<label_name>
:
<label_name>
is the name of the label.
Examples
In the following script, you instruct the script file to go to the :LABEL: label.
goto :LABEL:
echo “This line is not executed.”
:LABEL:
The argument to the goto command can be a variable whose value is a valid label
in the script file. This allows for dynamic branching within the script file.
setenv vector “:LABEL_2:”
goto $vector
echo “This line is skipped.”
:LABEL_2:
Note: The following examples only work from a script file; the examples will
not work from an interactive Technician Interface console.
Commenti su questo manuale