7 RETURN without GO SUB
Sinclair ZX Spectrum
Severity: MinorWhat it means
Sinclair's manual: there has been one more RETURN than there were GO SUBs.
Often the main program has run on into a subroutine and reached its RETURN.
Affected Models
- Sinclair ZX Spectrum 16K and 48K
- ZX Spectrum+
- Spectrum 128, +2 and +3 in 48 BASIC
How to Fix It
-
Put STOP on the line just before the first subroutine.
Spectrum BASIC has no END statement. STOP ends the program with report 9 STOP statement.
-
Check that each subroutine is reached with GO SUB, not GO TO.