-
Notifications
You must be signed in to change notification settings - Fork 0
GOSUB
Andrew Owen edited this page May 30, 2023
·
2 revisions
GO[ ]SUBline_number [anything]
Jumps to a subroutine at line_number
. The next RETURN
statement jumps back to the statement after GOSUB
. Anything after line_number
until the end of the
statement is ignored. If executed from a direct line, GOSUB
runs the subroutine and the following RETURN
returns execution to the direct line.
-
line_number
is an existing line number literal. - Further characters on the line are ignored until end of statement.
- If no
RETURN
is encountered, no problem. - One optional space is allowed between
GO
andSUB
; it will not be retained in the program.
- If
line_number
does not exist: Undefined line number. - If
line_number
is greater than65529
, only the first four characters are read (for example,6553
).
- Press
RETURN
to return to this menu. - Enter the name of a
TOPIC
to display it. - Enter
EXIT
to return to BASIC.
Choose from the following topics: