EasyManua.ls Logo

Radio Shack TRS-80 Model 3 - Page 153

Radio Shack TRS-80 Model 3
276 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
700
PRINT
"NAME","AGE"
"710
H1:::f\l)
N$
720
IF
N$
=
"END"
THEN
PRINT
"END
OF
LIST":
END
730
HE:f.'1D
(.\GE
740
IF
AGE
<
18
PRINT
N$,
AGE
7~)
0
GOTO
"710
760
DATA
"SMITH, JOHN",
30,
"ANDERSON,TuMu"'
20
7"70
DATA
"JONES,
BILL",
15,
"DOE,
SALLY", 21
780
DATA
"COLLINS,
ANDY",
17,
END
The
program
locates
and
prints all the
minors'
names from the data supplied. Note
the
use
of
an
END
string to allow READing lists
of
unknown
length.
See
DATA,
RESTORE
RESTORE
Causes
the
next
READ
statement
executed
to start
over
with the first itemin the first
DATA
statement. This lets
your
program
re-use the same
DATA
lines.
Example:
B10
READ
X
B20
RESTORE
830
READ
Y
8
L
.0
PRI
NT
X,
Y
B50
DATA
SQ.)'
60
B60
END
Because
ofthe
RESTORE
statement, the second
READ
statementstarts
over
with the
first
DATA
item.
See
READ,
DATA
3/11

Related product manuals