GOSUB

Format

GOSUB label1

Description

This statement "calls" a subroutine called "label1". This subroutine must contain a "RETURN". After the subroutine is executed, control is returned to the next statement following the GOSUB.

Example

GOSUB PRINTIT:
PRINT "All Done!"
END
PRINTIT: PRINT "It"
RETURN
After execution of this code the screen would contain:

It
All Done!