Resume Next; Return - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

RESUME NEXT
RESUME NEXT
10 ON ERROR GOTO 90
20 PRINT "press [RETURN] each time"
30 INPUT "1";a
40 INPUT "2";a
50 i npot "3";a :REM syntax error!
60 INPUT "4";a
70 INPUT "5";a
80 END
90 PRINT "error no.";ERR;"in Line";ERL
100 RESUME NEXT
run
COMMAND: Resumes normal execution of a program after an error has been
trapped and processed by an 0 N ERR 0 R GOT 0 command.
RES U MEN EX T will re-commence execution from the line after that in which the
error was first trapped.
Associatedkeywords: DERR, ERL, ERR, ERROR, ON ERROR GOTO, RESUME
RETURN
RETURN
10 GOSUB 50:PRINT "after the gosub":END
50 FOR n=1 TO 20
60 PRINT "sub-routine"
70 NEXT:PRINT
80 RETURN
run
COMMAND: Marks the end of a sub-routine. BASIC returns from the sub-routine to
the statement immediately after the GO SUB command which invoked it.
Associated keywords: GO SUB
Chapter 3 Page 68
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents

Save PDF