GOSUB

From Wikipedia, the free encyclopedia

GOSUB is a command in many versions of BASIC, which should always be accompanied by the RETURN command. GOSUB statements branch to simple kinds of subroutines without (sometimes with) parameters or local variables. It is convenient for performing the same function in BASIC programs without duplicating the same code repeatedly. It is not implemented in all versions of BASIC, which can create cumbersome GOTO loops.