Program-Line Review Keys - Sharp PC-1500A Instruction Manual

Hide thumbs Also See for PC-1500A:
Table of Contents

Advertisement

All
and
more
about Sharp PC-1500
at
http://www.PC-1500.info
Now
run the
revised program. What
happens?
Press
l•••ul
alter
"JOLLY"
appears.
Notice
in this
example
both
what SHARP
has
done
for
you and what you
have
had to do for
yourself. SHARP
has
arrangt'CI and executed lines 5
and
10
in
the
proper order. Yet,
to
nudge
SHARP on from
line
5
to 10,
to
see
the result of line
10,
you
have
to press ENTER between
outputs.
Although a
line
number may be
any
number
from
1
to
65,279,
we
strongly
advise
you
to
number your
lines
by
increments
of
10
(i.e.
10, 20, 30, · ·
·
etc.). This allows you to
insert
up to
9 statements between your current
statements {11 through 19.
for
instance}.
Some programmers
recommend
an even greater
gap;
numbering by 20's.
Although,
with careful program design and
writing,
you
will
ra
rely
need to
insert
statements, do
not
count on
this! It
is
far
easier
to
nur11ber
by 1
O's
now
than
to renumber
many
statements
later.
Remember
that no
two lines
may
have the
same
line
number.
If
this condition
should occur,
the
oldest
line (the one
entered
first)
will be
lost.
Th
is
feature can be exploited
to
delete
unwanted
lines
merely
by keying
the line number .af the line to
be deleted and pressing
l<••••I
.
Thus, an empty,
yet numbered, line
will
effectively
delete
an
existing line
with the
same number.
If duplicate
line numbers
are used unintentionally, however. trouble will resu lt
.
To
demonstrate this, enter
the
following
line
(in
PROgram mode,
of
course):
Keystrokes:
rn
ca
1
m
mmoo m
'"''"1
c:::i
rn
oomoom
I
SHIH)
c:J
l••TE•I
Now run
the
program
in
the
same
way you did before.
It
is
"JOLLY AWFUL"
to loose
a
program line,
isn'
t
~t?
And
since
line loss can lead
to some
very
subtle
errors,
you should
exercise
c-0ution in
writing
your programs.
E.
PROGRAM-LINE REVIEW keys
"But"', you might
ask
yourself,
"How can
I
remember what lines
I
have
entered?". Fear not
intrepid
programm.er'
This
need
to review has
been
anticipated and
provided
for with the
CO
(Up Arrow) and
CD
(Down
Arrow)
keys.
You may
think
of
these
as the
Program·line
Review
keys. By pressing the appropriate key (in PR
Ogram
mode), one
may
"move"
up or down through
the
lines of the
current
program
(a process
known appropriately as
"scrolling").
Switch to the PROgram mode and use the
Down
Arrow key to
review the
lines of our program
in ascending order. Now use the Up Arrow
key
to move back to the top
of
the program
{line 10).
Note that
if either Arrow
key
is held down, successive
lines will be displayed
automatically.
(Unfortunately,
Uiis
feature is
not
easily seen with a two
li
ne
program).
Once you have reached a
given
line
usi
ng
the Program·line Review keys, you
mllly
then
proceed
to
edit that
line
using the Right o
r
Left
Arrow keys. You will be delighted {relieved?) to discover
that the operation
of
these
keys in the
PROgram mode
is identical
to
their operation
in
the RUN
mode
(sec
Chapter 2).
The
DELete
and INSert fuonctions are
also available fo
r
use in
statement
editing,
and
are
invoked
in the same
manner
as
before.
NOTE:
That after any changes are
made
to
a
pro gram
line.
you must
press
ENTER
in
order
to
affect
those
changes. DO NOT use the
Up or Down
Arrow
keys
to move on to the next adjacent
line without pressing
l
t:•TE•I
or any
editing
you may
have
performed
w ill
be lost.
28
Do not sale this PDF
!!!

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents