Unexpected RETURN

Amstrad CPC

Severity: Minor

What it means

Error 3 in Amstrad's list: a RETURN command has been encountered when not in a subroutine.
Often the main program has run on into the subroutines below it.

Affected Models

  • Amstrad CPC464
  • CPC664 and CPC6128 (Locomotive BASIC 1.1)

How to Fix It

  1. Put END on the line just before the first subroutine.

  2. Check that each subroutine is reached with GOSUB, not GOTO.