HP (Hewlett-Packard) HP 33s Calculator User Manual


 
12–14 Simple Programming
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
Pressing
¹
¡
clears the contents of the displayed variable.
Press
¥
to continue the program,
If you don't want the program to stop, see "Displaying Information without
Stopping" below.
For example, see the program for "Normal and Inverse–Normal Distributions" in
chapter 16. Lines T0015 and T0016 at the end of the T routine display the result
for X. Note also that this VIEW instruction in this program is preceded by a RCL
instruction. The RCL instruction is not necessary, but it is convenient because it
brings the VIEWed variable to the X–register, making it available for manual
calculations. (Pressing
Ï
while viewing a VIEW display would have the
same effect.) The other application programs in chapters 15 through 17 also
ensure that the VIEWed variable is in the X–register as well — except for the
"Polynomial Root Finder" program.
Using Equations to Display Messages
Equations aren't checked for valid syntax until they're evaluated. This means you
can enter almost
any sequence of characters into a program as an equation — you
enter it just as you enter
any equation. On any program line, press
º
d
to
start the equation. Press number and math keys to get numbers and symbols. Press
h
before each letter. Press
Ï
to end the equation.
If flag 10 is set, equations are
displayed instead of being evaluated. This means
you can display any message you enter as an equation. (Flags are discussed in
detail in chapter 13.)
When the message is displayed, the program stops — press
¥
to resume
execution. If the displayed message is longer than 14 characters, the
annunciator turns on when the message is displayed. You can then use
Õ
and
Ö
to scroll the display.
If you don't want the program to stop, see "Displaying Information without
Stopping" below.
Example: INPUT, VIEW, and Messages in a Program.
Write an equation to find the surface area and volume of a cylinder given its
radius and height. Label the program
C (for cylinder), and use the variables S
(surface area),
V (volume), R (radius), and H (height). Use these formulas: