Commodore 128 System Manual page 308

Hide thumbs Also See for 128:
Table of Contents

Advertisement

This example READs the data in line 70 and stores it in numeric
variable X. It adds the total (T) of all the numeric data items. Once
all the data has been READ, three cycles through the loop, the
READ pointer is RESTOREd to the beginning of the program and
it returns to line 10 and performs repetitively.
10 READ A,B,C
20 DATA 100,500,750
30 READ X,Y,Z
40 DATA 36,24,38
50 RESTORE 40
60 READ S,P,Q
70 PRINT A,B, C
80 PRINT X,Y,Z
90 PRINT S,P,Q
This example RESTORES the DATA pointer to the first data item
in line 40. When line 60 is executed, it will READ the DATA
36,24,38 from line 40, since you don't need to READ line 20's
DATA again.
NOTE:
If a line a number is specified the line must exist! A
variable can be used e.g.
RESUME
Define where the program will continue (RESUME) after an error
has been trapped
RESUME [line#| NEXT]
This statement is used to restart program execution after
TRAPping an error. With no parameters, RESUME attempts to re­
execute the line in which the error occurred. RESUME NEXT
resumes execution at the statement immediately following the
one containing the error; RESUME followed by a line number will
GOTO the specific line and resume execution from that line
number. RESUME can only be used in program mode.
17-66
RESTORE LR.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents