EasyManua.ls Logo

Sharp PC-1500 - Read. Data, Restore

Sharp PC-1500
169 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...
A
ll
and more about Sharp
PC
-1
500
at
http://www.PC-1500.info
Program Listing:
10
FOR W= 0
TO
102 STEP 2
20
WAIT W
30
BE
EP
1.5
40 PRINT " .
'"
'
50
NEXT W
60
END
Keystrokes:
m
r
~
moo moo
r
=
1rnw
oomoomrn
[!_]
[ eJ
ru
(IJ
lt
HT
CO
)
wwrn:J m
mm
~
,
••
, ,
rn
rnrnmm
mrn1
•"
''
LIJ m 1"'''"'
rn
m m
ou
[IJ
IN]
[!]
\ SHIFT) [::::J
(C]
! SHIFT I
CJ
I SMIFT I
CD
I
CNTCFt
!
mre:ion m
ru
cn~
1
•••
,.1
rnrn
m w m '
'"""
'
R. READ,
DATA
and RESTORE
Not all
data
within a program must
be
entered by the user
of
the
program, Often, useful data
is relatively st
ai
tic, such as tax tables
..
vithin a financial application or stress constants in an
engineering application. These types
of
information may
be
embedded within a program, and
utilized when needed, through the use
of
the
DATA, READ, and RESTORE statements. These
statements act in concert
to
specify the data used
by
a program,
to
tr<:>nsfer
the
<Jata
into
variab
les,
and
to
repeat th.e process
as
necessary.
The DATA
statement
consists
of
the
keyword DATA followed by a list
of
data items. These
include numbers, in
rea
l or
sc
ientific notation,
and
character str
in
gs.
The items
in
the
li
st
arc
separated
by
co
1nmas.
Data
statements may appear anywhere \Vithin a program, but many
programmers prefer to group them
at
the
beginning
of
the program. This enables them to be
found more
easily when the program
is
read.
A typical
DA
TA
statement
mig
ht
resemble
the following;
10
DA
TA "MOBY DICK", 20000, "WHITE
",
"M
",
112
The READ stateme
nt
consists
of
the keyword
READ
fo
llowed by a list
of
variable names.
These may
be
numeric or character variable
names.
T
he
variable names within
the
list
~re
separated
by
commas. The READ statement
ca
u
ses
an item,
or
it
ems,
of
data
to
be
"read"
from
a
DATA
statement
and stored in the
associatC>d
variables. A READ
statement
corresponding
to
our
previous
DA
TA statement is:
120
READ N$, \VT, C$, SX$, L
SHA
RP
insists that every time a READ
statement
is
exec
ut
ed there be a corresponding
data
i
tem
within a DATA statement. Thus,
the
following program will produce an
error
on
line
30
because all
of
the
data items have been "used
up"
by
the
READ statement
on
li
ne
20:
55
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals