EasyManuals Logo

Sharp MZ-800 User Manual

Sharp MZ-800
221 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
Page #88 background imageLoading...
Page #88 background image
READ
~
DATA
Example
Format
READ
<variable>[,<variable>]
...
5
DATA
<constant>[,<constant>]
...
Abbreviated
Format
REA.
~DA.
Explanation
Like
the
INPUT
and
GET
statements,
the
READ
statement
is
used
to
submit
data
to
the
computer
for
processing.
However,
unlike
the
other
two
statements,
data
is
not
entered
from
the
keyboard,
but
is
instead
held
in
the
program
itself
with
DATA
statements.
More
specifically,
the
function
of
the
READ
statement
is
to
read
suc-
cessive
items
of
data
into
variables
from
a
list
of
values
which
follows
a
DATA
statement.
When
doing
this,
there
must
be
a
one-to-one
correspondence
between
the
variables
of
the
READ
statements
and
the
data
items
specified
in
the
DATA
statements.
Quotation
marks
can
be
omitted
for
string
data
in
DATA
statements.
However,
they
cannot
be
omitted
for
null
strings
and
strings
including
spaces.
(Example
1)
10
READ
A,B,C,D
20
PRINT
A;B;C;D
30
END
40
DATA
10,100,50,60
RUN
10
100
50
60
In
this
example,
the
values
specified
in
the
DATA
statement
are
read
into
variables
A,
B,
C,
and
D
by
the
READ
statement,
then
the
values
of
those
variables
are
dis-
played.
(Example
2)
10
READ
X$,A1,Z$
20
PRINT
X$;A1;Z$
30
END
40
DATA
A,1,C
As
shown
by
the
example
above,
string
data
included
in
DATA
statements
does
not
need
to
be
enclosed
in
quotation
marks.
RUN
A
1C
The
READ
statement
in
this
example
picks
successive
data
items
from
the
list
specified
in
the
DATA
statement,
then
substitutes
each
item
into
the
corresponding
variable
in
the
list
following
the
READ
statement.
6-31

Other manuals for Sharp MZ-800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sharp MZ-800 and is the answer not in the manual?

Sharp MZ-800 Specifications

General IconGeneral
BrandSharp
ModelMZ-800
CategoryDesktop
LanguageEnglish

Related product manuals