-
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_numberis an existing line number literal. - Further characters on the line are ignored until end of statement.
- If no
RETURNis encountered, no problem. - One optional space is allowed between
GOandSUB; it will not be retained in the program.
- If
line_numberdoes not exist: Undefined line number. - If
line_numberis greater than65529, only the first four characters are read (for example,6553).
- Press
RETURNto return to this menu. - Enter the name of a
TOPICto display it. - Enter
EXITto return to BASIC.
Choose from the following topics: