Download  Print this page

Testing A Program - HP 35s User Manual

Scientific calculator.
Hide thumbs

Advertisement

Testing a Program

If you know there is an error in a program, but are not sure where the error is, then
a good way to test the program is by 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 is not active (PRGM
annunciator off).
2.
Set the program pointer to the start of the program (that is, at its LBL
instruction). The instruction moves the program pointer without starting
execution.
3. Press and hold
Ø
, 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
4. The program pointer moves to the next line. Repeat step 3 until you find an
error (an incorrect result occurs) or reach the end of the program.
If Program–entry mode is active, then
pointer, without executing lines. Holding down a cursor 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 mode is not active before you start:
Keys:
(In RPN mode)

Ø
(hold) (release)
Ø
(hold) (release)
Ø
. This displays the current program line. When you release
Display:

  

 

×
Ø
×
or
simply changes the program
Moves program counter to label A.
Squares input.
Simple Programming
. No execution occurs.
Description:
13-11

Advertisement

Table of Contents

   Related Manuals for HP 35s

This manual is also suitable for:

F2215aa - 35s scientific calculator

Comments to this Manuals

Symbols: 0
Latest comments: