Programming
77
Programming Example
The following programming example, and all examples in this chapter, were written with
Chain or Algebraic set as the operating mode. Since a program executes the keys exactly as
if you were manually pressing them, the current operating mode affects how the program
executes. If you normally operate in RPN, verify your operating mode is set to either Chain or
Algebraic before proceeding so you can follow along with the examples below.
For more information about setting the operating mode, refer to the section titled, The Mode
Menu: Setting Preferences in Chapter 1, Basic Features.
The volume of a sphere is represented by the equation, . We will create a program that
can calculate the volume of a sphere without having to retype all the keys each time you wish
to calculate the volume of a given sphere. Verify your FIX setting is set for three digits to the
right of the decimal point. For more information on the FIX setting, refer to the section titled,
The Mode Menu: Setting Preferences in Chapter 1, Basic Features.
Table 13-2
Keys Display Description
:E
Enters program mode. The first program is
selected.
I
Starts editing program 0. Note the
counter shows your current position in the
program.
:h3*
4/3*
:sI
I=
We have entered a program that takes
the currently displayed number, raises it to
the 3rd power, and multiplies it by 4/3 of
PI.
:(HOLD)
The STOP instruction tells the calculator
that the program is ending. Note that to
enter that special instruction, you need to
press and hold the shift key, then press the
L key (STOP) before releasing both
keys.
4
3
---
πr
3