EasyManua.ls Logo

HP HP-32S - Testing a Program

HP HP-32S
312 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...
Testing
a
Program
If
you
know
there
isan
error
ina
program,
but
are
not
sure
where
the
error
is,
then
a
good
way
to
test
the
program
isby
stepwise
execution.
It is
also
a
good
idea
to
test
a
long
or
complicated
program
before
relying
on it.
By
stepping
through
its
execution,
one
line
at a
time,
you
can
see
the
result
after
each
program
line
is
executed,
so
you
can
verify the progress of known data whose correct results are also
known.
1.
As
for
regular
execution,
make
sure
program
entry
isnot
active
(PRGM annunciator off).
2.
Press
jg|gto |
label
to set the
program
pointer
to the startof the
program
(that is, at its
LBL
instruction).
The
go
to
instruction
moves
the
program
pointer
without
starting
execution.
(If
the
program
is the
first
or
only
program,
you
can
press
BfGToinFI
to move to its beginning.)
3.
Press
and
hold
[•].
This
displays
the
current
program
line.
When
you release (Tj, the line is executed. The result of
that
execution
is then displayed (it is in the
X-register).
To
move
to the
preceding
line,
you
can
press
§)[£].No
execution
occurs.
4.
The
program
pointer
moves
to
the
next
line.
Repeat
step
3
until
youfind an error (an incorrect result
occurs)
or reach the end of
the program.
If
program
entry
is
active,
then
(T)
(or
§|[T|)
simply
changes
the
pro
gram
pointer,
without
executing
lines.
Holding
down
an
arrow
key
during
program
entry
makes
the
lines
roll
by
automatically.
Example: Testing a
Program.
Step
through
the
execution
of the
program labeled A. Use a radius of 5 for
the
test data. Check
that
program entry is not active before you start.
76
5:
Simple
Programming

Table of Contents

Related product manuals