Executing A Program One Line At A Time - HP 12C Platinum Owner's Handbook Manual

And problem-solving guide
Hide thumbs Also See for 12C Platinum:
Table of Contents

Advertisement

94
Section 8: Programming Basics
For example, assuming the calculator is still in Program mode, you can set it to
program line 000 as follows:
Keystrokes
gi.000

Executing a Program One Line at a Time

Pressing Ê repeatedly with the calculator in Program mode (as described
earlier) enables you to verify that the program you have stored is identical to the
program you wrote – that is, to verify that you have keyed the instructions in
correctly. However, this does not ensure that the program you wrote calculates
the desired results correctly: even programs created by the most experienced
programmers often do not work correctly when they are first written.
To help you verify that your program works correctly, you can execute the
program one line at a time, using the Ê key. Pressing Ê while the calculator
is in Run mode advances the calculator to the next line in program memory, then
displays that line's number and the keycode of the instruction stored there, just as
in Program mode. In Run mode, however, when the Ê key is released the
instruction in the program line just displayed is executed and the display then
shows the result of executing that line.
For example, to execute the program stored in the calculator one line at a time:
Keystrokes
Display
(RPN mode)
fs
124.25
625
625.
Ê
001,
625.00
Ê
002,
2.
Ê
003,
25.
Ê
004,
Display
Program line 000
000,
Sets calculator to Run mode and
to line 000 in program memory.
(Display shown assumes results
remain from previous
calculation.)
Keys in price of typewriter.
36 Program line 001: \
Result of executing program line
001.
2 Program line 002: 2.
Result of executing program line
002.
5 Program line 003: 5.
Result of executing program line
003.
25 Program line 004: b

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents