BASIC-SO

Commands and Statements

RESTORE [line number]

10 DATA 48,49,51,53,58

20DATA 104,108,116,132,164,5000,5000

30READA,B

560IF B<5000 THEN 30

570RESTORE

580READA,B

RESUME

The RESUME statement restarts program execution after an error has been detected and handled. Program execution begins at the line specified; or if no line number is specified, execution resumes at the statement where the error occurred. The state- ment RESUME NEXT causes execution at the statement following the erroneous statement.

RESUME [line numberlNEXT]

140 ON ERROR GOTO 200

200PRINT "ERROR";ERR;"AT LlNE";ERL;"."

210PRINT

220RESUME NEXT

RETURN

The RETURN statement is placed at the end of a subroutine, and transfers program control back to the instruction line immediately following the last GOSUB or ON ...

GOSUB statement executed.

RETURN

50 GOSUB 200

60 PRINT "TYPE NEXT NUMBER"

200IF A>100 THEN PRINT "OUT OF RANGE"

210IF A<=O THEN PRINT "A MUST BE >0"

220A=11 (B* B1)

230PRINT

240PRINT "YOUR NEW FIGURE IS ";A;

6-21

Page 61
Image 61
Intel 9800758-02 manual Resume, Return