Go to a label.
||An integer specifying a label. nnn can be specified as a label integer, or as a reference to a buffer or a select list that contains the label integer.
PROC command redirects execution to the specified label location. You can establish a label by specifying an integer at the beginning of a PROC line. This integer is separated by a blank space from a PROC command on the same line. You can specify up to 256 labels in a PROC. If a duplicate label occurs, GO
goes to the first label with that number, searching from the beginning of the PROC.
goes to the specified label. GOSUB nnn
goes to the specified label, then can return with RSUB
. The (
command and [
command transfer execution to a different PROC, and can specify a label number within that PROC. GO F
goes forward to the next location established by the M
command. GO B
goes backward to the most-recently encountered location established by the M
can take an A
reference to specify retrieval of a label location from the input buffer. When used with IF
cannot contain a char
The following example shows GO
jumping to label 10:
MV %1 "A"
IF %1 = "A" GO 10
ODon't Display this
XEnd of proc not taken
10 ODisplay this
XEnd of proc taken
© 1997-2019 InterSystems Corporation, Cambridge, MA