EasyManua.ls Logo

Commodore Plus 4 - Page 88

Commodore Plus 4
464 pages
Print Icon
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...
76
The
BASIC
Language
of
the
screen
border.
If
you
want
to
find
the
number
of
the
color
in
the
color
source,
use
the
RCLR
function.
READ
READ
input
list
Abbr.
rE
Always
paired
with
DATA
commands,
one
of
several
ways
to
assign
data
values
within a
program.
READ
contains
a
list
of
variables,
and
DATA
contains
a
list
of
values.
READ
gets
a
value
from
a
DATA
command
for
each
of
its
variables.
You
cannot
input
data
from
the
keyboard
for
READ
commands.
The
program
must
contain
enough
DATA
values
for
the
READ
variables.
If
there
are
not
enough
values,
the
program
is
aborted
and
an
OUT
OF
DATA
ERROR
message
is
displayed.
However,
the
total
number
of
DATA
values
in
all
DATA
commands
is
what
counts,
not
the
number
of
values
per
DATA
com
mand.
When
one
DATA
command
runs
out
of
values,
READ
automatically
looks
for
the
next
DATA
command
in
the
program.
DATA
commands
do
not
have
to
precede
READ
commands.
You
can
reREAD
DATA
values
after
you
use
the
RESTORE
command
to
reset
the
data
pointer
to
the
beginning
of
a
DATA
command.
See
RESTORE.
Parameter:
variable(s)
The
READ
variables
and
the
value
types
in
the
DATA
commands
must
match
(e.g.,
only
text
strings
can
be
assigned
to
text-string
variables).
Variables
must
be
separated
by
commas.
Examples:
10
DATA
55,44,33
20
READA,B,C,D
40
PRINT
A,B,C,D
RUN
?0UT
OP
DATA
ERROR
IN
20
NEW
10
DATA
MONDAY,
MARCH,
18TH
20
READA$,B$
30
READ
C$,X
40
PRINT
A$,B$,C$
50
DATA
1985
60
PRINT
B$;X
RUN
MONDAY
MARCH
18TH
MABCH
1985
The
program
must
have
at
least
as
many
DATA
values
as
READ
variables.

Other manuals for Commodore Plus 4

Related product manuals