Debugging a program – HP 30b Business Professional Calculator User Manual
Page 93

Programming 85
3. Press
>
until the letter R appears, and then press
I
. Press
.
and the
screen should display a ?.
4. Press
O
to exit.
5. Press
:
(HOLD) .
Then
press
O
to exit.
6. Now enter program mode again by pressing
:E
. The display will show R? in
video inverse. Since program 0 has a message as the first command, it is now named
R?. The video inverse signifies that it is assigned to a key, in this case
k
. Press
O
to exit.
7. Now press
:k
. Notice R? appears, and the program pauses to wait for input.
Type
5=
and press
:
(HOLD)
to resume. The program continues and
calculates the volume.
Debugging a Program
At times, programs do not work as expected. You can debug your programs by pressing the
:
(HOLD)
>
or
:
(HOLD)
<
keys as follows:
Open the Program menu and select the program you want to debug. To execute the first
instruction, press
:
(HOLD)
<
. Press this key combination repeatedly to execute your
program one instruction at a time. The current instruction is displayed as long as the
<
key is pressed.
If you want to see the next instruction without executing it, press
:
(HOLD)
>
in the
same manner.
If you want to let the program continue by itself, press
:
(HOLD)
. If you want to
start debugging a program in the middle, place a run/stop (R/S) instruction where you want
to start debugging the program, run the program and start debugging using
:
(HOLD)
>
or
<
when the program stops due to the R/S.