Sharp MZ-700 Series Owner's Manual page 48

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2. 3. 5. 6 RESTORE
(abbreviated format: . . . RES.)
RESTORE or RESTORE Ln
When READ statements are executed, a pointer managed by the BASIC interpreter
is incremented to keep track of the next item of data to be read from DATA state-
ments. The RESTORE statement resets this pointer to (1) the beginning of the
first DATA statement in the program or (2) the beginning of the DATA statement
on a specified line.
1 0
D A T A
1 , 2 , 3
2 0
D A T A
" A A " ,
" B B "
3 0
R E A D
X , Y
4 0
R E A D
Z ,
V $
1 0 0
R E S T O R E
1 1 0
R E A D
A , B , C , D $ ,
E S
2 0 0
R E A D
I , J
2 1 0
R E S T O R E
2 2 0
R E A D
M, N
2 3 0
R E S T O R E
2 6 0
2 4 0
R E A D
O , P
2 5 0
D A T A
1 , 2 , 3 , 4
2 6 0
D A T A
- 1 , - 2 , - 3 ,
- 4
An error will result if the number specified in Ln is the number of non-existent line.
1 0
X = 3 3 X R N D ( 1 )
2 0
F O R
A = 1
T O
!
3 0
R E A D
M S
4 0
P R I N T
T A B ( 0 )
; "
5 0
P R I N T
T A B ( 3 7 )
;
6 0
N E X T
A
7 0
Y = 1 0 X R N D ( 1 )
8 0
F O R
A = 1
T O
Y
9 0
P R I N T
T A B ( 0 )
; '
1 0 0
P R I N T
T A B
( 3 7 )
1 1 0
R E S T O R E : G O T O
1 2 0
D A T A "
a n B "
1 3 0
D A T A "
3SSSS5
1 4 0
D A T A "
HBPr\"
This function creates random
numbers (see page 12).
" ; T A B ( X )
; M S ;
l!
;
n ^^ ii
1 0
m"
N E X T
Note: See page 62 for the TAB function and page 47 for the FOR . . . NEXT statement.
46

Advertisement

Table of Contents
loading

Table of Contents