Stopping Program Execution Automatically - HP -10C Owner's Handbook Manual

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

Advertisement

Stopping Program Execution Automatically

Program execution is automatically halted when the program executes a ¦
instruction. To resume executing the program from the program line at which
execution was halted, press ¦.
Example:
Mother's
company, wants to package a ready-to-eat
spaghetti mix containing three cans: one of
spaghetti sauce, one of grated cheese, and one
of meatballs. Mother's needs to calculate the
base areas, total surface areas, and volumes of
the three cylindrically shaped cans. It would
also like to know, per package, the total can
base area, surface area, and volume.
The program to calculate this information uses
these formulas and data:
base area = πr
volume = base area × height = πr
surface area = 2 × base area + side area = 2πr
The keystroke sequence will use storage register arithmetic (described on page
30) in registers R
the registers before starting to ensure that the column sums are initialized to
zero.
Since r must be used twice in the course of the calculations, we'll store r in R
We will do this prior to running the program, since r will vary with each run.
We will then recall r in the program with a l instruction. We will enter h
directly, right after the base area calculation is made. We will provide for the
program to stop at this point, so that the data can be entered. This is
accomplished with an ¦ instruction in the program. We can then manually
restart the program by pressing ¦. (Alternatively, we could store and recall
h, as for r, though in this program it would require more total keystrokes to do
so.) This illustrates the two modes of data entry in a program:
1. Prior entry. Store (with O the data in a storage register prior to
running the program, and then recall it (with l) within the
program.
Kitchen,
2
, R
, and R
to calculate area and volume sums. We will clear
1
2
3
Section 5: Programming Basics
a
canning
2
h
2
+ 2πrh
67
.
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents