Reference Guide

1-4 RPL Programming
To stop an executing program:
Press
.
Example:
Enter a program that takes a radius value from the stack and calculates the volume of a sphere of radius
r using
3
3
4
r
V
π
=
If you were going to calculate the volume manually after entering the radius on the stack, you might press these
keys:
3Q!
ì*
4`3/*@ï
Enter the same keystrokes in a program. ( just starts a new line.)
@
%
3Q!
ì*
4#3/
*
Put the program on the stack.
`
Store the program in variable VOL. Then put a radius of 4 on the stack and run the VOL program.
OVOL K
4 J
%VOL%
The program is
« 3 ^ π * 4 3 / * →NUM »
Example:
Replace the program from the previous example with one that’s easier to read. Enter a program that
uses a local variable structure to calculate the volume of a sphere. The program is
« → r '4/3*π*r^3' →NUM »
(You need to include →NUM because π causes a symbolic result, unless Flag –2 or Flag –3 is set)
Enter the program. ( just starts a new line.)
@
%
r
#
O4
/3
*
!
ì*
r
Q3 ™@ë@ï
Put the program on the stack, store it in VOL, and calculate the volume for a radius of 4.
OVOLK
4
%VOL%