gosub

A BASIC command used to call a subroutine. Unfortunately, most dialects could only handle line numbers and no other arguments, making GOSUB little better than its cousin GOTO for purposes of avoiding spaghetti code. Each subroutine called by&a GOSUB must be ended by RETURN.

10 GOSUB 100
20 PRINT "World!":END
100 PRINT "Hello ";:RETURN

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.