Skip to main content

GO

Go to a label.

Synopsis

GO nnn
GO F
GO B

Arguments

nnn 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.

Description

The GO 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.

GO, G, and GOTO are synonyms.

GO nnn 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 command.

GO can take an A reference to specify retrieval of a label location from the input buffer. When used with IF or GO, A cannot contain a char delimiter character.

Example

The following example shows GO jumping to label 10:

PQN
MV %1 "A"
IF %1 = "A" GO 10
ODon't Display this
XEnd of proc not taken
10 ODisplay this
XEnd of proc taken

See Also

  • GOSUB PROC command

  • M PROC command

FeedbackOpens in a new tab