GOSUB
Syntax: GOSUB lno | variable | expression
Pushes the current program location onto the return stack and then causes execution to proceed with the line number specified by "lno". You may resume execution after the GOSUB command at any time by issuing the RETURN command. Should your program decide not to return then you must use the "POP" command to remove the return address from the stack.
Example
10 PRINT "One"
20 GOSUB 50
30 PRINT "Three"
40 END
50 PRINT "Two"
60 RETURN
|