Record a keystroke program
Store a sequence of keys under a label and replay it with one press.
A keystroke program is just keys you would normally press, saved in a numbered list. Give the first line a label, end it with a return, then run it any time.
This example makes a program that finds the area of a circle from its radius: square the number, then multiply by π.
RPN Scientific 15
Start on the main screen: There is no menu to leave. Press the back arrow to clear a number you are typing, or CLx (g then back arrow) to clear the X register.
Switch to program mode: press g, then R/S (P/R). The display shows line 000.
gP/RR/SStart with a label: press f, then SST (LBL), then the A key (the √x key). Label A is how you will call the program later.
fLBLSST√xRecord the work: g, x² squares the radius. g, π adds π. × multiplies them.
gx²√xgπEEX×End with g, GSB (RTN), then leave program mode with g, R/S. Nothing was calculated while recording.
gRTNGSBgP/RR/SRun it. Key in the radius 3, then press f and A.
3fA√x
You should seeThe area is 28.2743 for radius 3.
Key in a new radius and press f, A again to reuse the program. Earlier answers move up the stack.
Tips
- Whatever is in X when you start is the program's input, and whatever is in X at RTN is its output.
- To clear all programs while in program mode, press f then R↓ (CLEAR PRGM).
Related guides
- Solve an equation with your own programWrite the equation as a program, then let SOLVE find where it equals zero.
- Named programs with variablesWrite a program with a text name and a variable, store a value and run it.
- How the RPN stack worksEnter numbers first, then the operation. Learn what ENTER, swap and the stack do.