Section 8: Programming Basics 107

Example: Run the program created above to calculate the net cost of a typewriter listing for $625 and an executive chair listing for $159.

Keystrokes

Display

 

(RPN mode)

 

 

 

fs

155.00

Sets calculator to Run mode. Display

 

 

shows number previously calculated.

f]

155.00

Sets RPN mode.

625

625.

Keys in price of typewriter.

t

473.75

Net cost of typewriter.

159

159.

Keys in list price of chair.

t

124.25

Net cost of chair.

 

Keystrokes

Display

 

(ALG mode)

 

 

 

fs

155.00

Sets calculator to Run mode. Display

 

 

shows number previously calculated.

f[

155.00

Sets ALG mode.

625

625.

Keys in price of typewriter.

t

473.75

Net cost of typewriter.

159

159.

Keys in list price of chair.

t

124.25

Net cost of chair.

 

That’s all there is to creating and running simple programs! But if you want to use programs frequently, you’ll want to know more about programming — such as how to check what keystrokes are stored in program memory, how many keystrokes can be stored in program memory, how to correct or otherwise modify programs, how to skip keystrokes when running a program, and so on. Before you can understand these aspects of programming, we need to briefly discuss how keystrokes are treated by the calculator when they are stored in Program mode and when they are executed in Run mode.

File name: hp 12c pt_user's guide_English_HDPMF123E27

Page: 107 of 275

Printed Date: 2005/8/1

Dimension: 14.8 cm x 21 cm