Radio Shack TRS-80 PC-3 Owner's Manual page 167

Table of Contents

Advertisement

1 RETURN
Abbreviations: RE., RET., RETU., RETUR.
See also: GOSUB,
ON ...
GOSUB
Purpose
The RETURN verb is used at the end of a subroutine to return control to the statement following the originating GOSUB.
Use
A subroutine may have more than one RETURN statement, but the first one executed terminates the execution of the subroutine.
The next statement executed will be the one following the GOSUB or ON ... GOSUB which calls the subroutine. If a RETURN is
executed without a GOSUB, an Error 5 will occur.
Examples
10 GOSUB 100
When run, this program prints the word "HELLO" one time.
20
END
100 PRINT "HELLO"
110 RETURN
167

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents