Example 2-Editing A Program - Sharp PC-1403 Operation Manual

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

94
ERROR
1
IN
10
RUN
IEHTERI
Display
Input
Don't
forget
to
press
I
ENTER
I
at the
end
of
the
line.
If
you now change to the
RUN
mode
by pressing ~
and enter
the
RUN
command,
the following
appears:
110
PR
I
NT"GOOD"!-
GOOD"!
Display
Input
Notice that the
cursor
is now
in
the
flashing block form
indicating
that
it is "on top of"
an
existing
character.
Type
in:
j
1
0
PR
I
NT
",
H ,.E LL 0"
j
10:
PR I NT "HELLO"
OJ
Display
Input
Are
you
still
in
the
RUN
mode?
If
so
change
to the
PROgram
mode.
You need to
recall
your
program
in
order
to
edit
it. Use
the
Up
Arrow
(
t)
to recall your
program.
If your
program
was completely
executed, the
OJ
key
will
recall the
last
line of the program.
If
there
was
an error in
the
program,
or
if
you used
the BREAK
(~iii) key to
stop
execution,
the IT] key
will
recall
the line
in which
the
error
or
BREAK
occurred.
To
make
changes
i
n
your program, use
the
CD
key to
move up
in
your
program (recall
the previous line)
and
the
m
key to move
down in your
program (display
the
next line).
If
held down,
the
OJ
and
CD
keys will
scroll
vertically,
that
is,
they
will
display
each line
moving up
or
down in your
program.
You will remember
that to
move the cursor
within
a
line,
you
use
the
~
(ri
g ht arrow)
and
.,,..
(left
arrow).
Using
the
[El
key,
position the
cursor over
the
first
character
you
wish to
change:
Suppose you
wanted
to change the
message
that
your program
was
di
s
playing,
that
is,
you
wanted
to edit
your
program.
With
a
single line
program,
you could
just retype
the
entry,
but as you develop more complex
programs,
editing becomes a very
important component
of
your
programming. Let's edit the
program you
have
just
written.
Example 2-Editing a Program
Since
this is
the
only
line
of
the
program,
the
computer
wi
l l
stop
executing at this point.
Press
I
ENTER
I
to get
out
of
the
program and
reenter
RUN if
you·
wish
to
execute
the
program
again.
Programming
the
Computer

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents