EasyManua.ls Logo

Sharp PC-1500 - The LIST Command; The More, the Merrier; The END Statement

Sharp PC-1500
169 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...
A
ll
and more about Sharp PC-1500
at
http://www.PC-1500.info
50
PRIMT
"WA
S AN EGGHE
AD"
You may
no
w proceed to
ed
it the line using the familiar INScrt,
DELetc.
and
Ar
row
keys.
When
you h
ave
finish
ed editi
na.
you
m
us
t press IE
•t
E•
I to instruct SHARP to st
oro
tho
corrected
lin
e.
K.
The
LI
ST
Command
Another way to display a particular
li
ne
of"
program is to
use
the
LIS
T c
omm
and
whose form
is
:
LIST
----
-----
~
or
°=1
L , LIST
li
neĀ·nu
rnb
er
If
no lineĀ·number
is
given, the first program l ine
wi
ll
be
displayed.
If
a
lir1
e-number
is
specified, the program
li
ne
with
that number
is
displayed.
If
no progr
am
lin
e
has
the given number, the next program li
ne
whose number
is
largl!r is displayed. For
example, assuming the following program:
15
PR
INT
"MOTHER
GOOSE"
30
PR
INT
"W
AS
A";
45
PR
INT
"QUAC
K"
the command
LIS
T
40
will
display
li
ne
45. The command LIST
will
display line 15,
and
the
command
LIST
30
wi
ll
display line
30
(what else?).
NOT
E: If y
ou
specify a lineĀ·number which is
la
rger
than
any existing
progr
am
line.number.
an
ERROR
11
wi
ll
occur.
L.
The More, the Merrier
As
\Ve
ha
ve
mentioned
previ
o
usly
, it is
poss
i
ble
to
maintain
more
tha
n
one
prog
r
am
in
memory
at the
sa
me
time
. The
tri
ck
to
doing this
is
to
give
eaeh
program its
own
range
of
line-numbers.
For exampl
e,
o
ne
program could
ha
ve
line-numbers of 10
to
200
whil
e the l
ines
of
a
second
program
would
be
numbe
red
from
300
to 500. You must,
of
course,
be
careful
not
to
accidentally
in
tcrmix statements from the various prog
ram
s (by incorrect numbering, or
unpredictable
resu
lts
co
uld
follow.
L.1. The
END
Statement
Another problem that occurs while storing several programs simultaneously is that each
program is just a group
of
numbered statements and statements are executed
in
ascending order.
Therefore.
how
will SHARP know wh
en
it
has
fin
i
shed
executing statemen
ts
from a given
program? The an
swe
r
is
that
it
wo
n
't
unless
you
tell
it.
The stat
eme
nt
used
to
signal the
computer that
it
has
reached
the end
of
a program
is
the END statement.
Unti
l now
we
have
n
ot
used, nor needed,
the
END
sta
tement. SHARP
has
si
mp
ly
executed all
of
our program lines
in
asc
endi
ng
order u
nt
ii
it
ran
out
of
statements. When
it
ran
out,
the
computer
decided
that
t
he
program
was
finished
and
return
ed
to
wait
for
our
next command.
Now, however. we must tell SHARP
to
stop execu
tin
g instructions before
it
co
ntinues on
to
the
next program.
To illus
tra
te
the use
of
multiple programs enter the f
ollow
ing lines:
43
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals