HP -11C Owner's Handbook Manual page 50

Hide thumbs Also See for HP-11C:
Table of Contents

Advertisement

Section 6
Program Editing
Editing in Brief
Even
the most experienced
programmers
find errors in their
programs.
These errors range
from
mistakes
in the original
formulas to mistakes in recording the program. Whenever errors
occur they need to be found and corrected. Your HP-11C is designed
to make this error-checking process as easy as possible.
A program that uses storage registers or status settings (such as
flags or trigonometric modes)
may
give rise to errors if such
information is incorrect when you run the program. However, you
can
eliminate
the
possibility
of this
type
error
using
an
initializing—clearing
or resetting—procedure.
One
method
of
initializing a program is to execute the necessary clearing and
resetting instructions from the keyboard before beginning program
execution. Another method is to make the program self-initializing
by including the necessary instructions at the beginning of the
program.
Finding Program Errors
One of the easiest ways to help verify that a program is working |
properly is to run a test case in which you either know the answer |
or the answer can be easily determined. Another option is to test a
program for proper responses at its intended limits of applications
and accuracy. For some types of calculations, you may even want
to test the program for proper responses to illegal data. To help
locate any potential problems in a self-initializing program, try
running the program several times with all data registers loaded
with meaningless data, in different trig modes, and with the flags
set, and then cleared.
The editing features of your HP-11C have been designed to provide
you with quick and easy access to any part of a program, whether
for editing, debugging,
or documentation.
If a program
stops
running because of an error or because of an overflow, you can
simply clear the error message,
then switch the calculator to
pad
~we~
Rh a
Section 6: Program Editing
97
Program mode to see the line number and keycode of the operation
that caused the error or overflow. If you suspect that a portion of
your program is faulty you can check execution step by step, then
use the other editing features to make any necessary changes.
Editing Functions
Your HP-11C's function set includes the following four nonpro-
grammable
editing and manipulation
functions
to aid you in
modifying and correcting your programs:
Sst]
[BST]
[GTO|- Jann
[+
SST](Single-Step).
In Program Mode:
When you press and release
the calculator
moves
to and
displays the next line in occu-
SST
pied program
memory.
If you
press and hold
in program
mode, the calculator will con-
tinuously scroll through the instructions in program memory
until you release the [SST] key. When using [SST] in program
mode, no program instructions are executed.
001-42,21,11
In Run Mode:
When you press [SST] the calculator moves to and displays the
next line of program memory. When you release [SST], the
calculator executes the instruction loaded in that line.
(Back Step). Pressing [¢)
causes the calculator to step or scroll
002-
4313
backwards through program memory
in the same way that [SST] causes the
(ees
calculator to step or scroll forward.
(No program
instructions
are
001-42,21,11
executed.)
(GTO)E)nnn (Go To Line nnn). Pressing
(Jnnn in Program
or Run mode causes the calculator to go to the program line number

Advertisement

Table of Contents
loading

Table of Contents