Single-Stepping Through A Program - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

Here is a stack diagram and program listing for TORSV.
Program:
«
 a b
«
»
»
`
O TORSV K
Now use TORSV to calculate the volume of a torus of inner radius a = 6 and outer radius b = 8.
6 ` 8 J %TORSV%

Single-Stepping through a Program

It's easier to understand how a program works if you execute it step by step, observing the effect of each step.
Doing this can help you debug your own programs or understand programs written by others.
To single-step from the start of a program:
1. Put the program or program name in level 1 ( or the command line).
2. Press !°LL%RUN% %DBUG% to start and immediately suspend execution. HLT appears in the status
area.
3. Take any action:
To see the next program step displayed in the status area and then executed, press %SST%.
!
To display but not execute the next one or two program steps, press %NEXT%.
!
To continue with normal execution, press !=.
!
To abandon further execution, press %KILL%.
!
4. Repeat the previous step as desired.
To turn off the HALT annunciator at any time:
Press !°LL %RUN% %KILL%.
!
Level 2
Level 1
a
b
a b TORSA
b a - * 4 /
"
Level 1
"
volume
Comments:
Creates local variables a and b.
Starts a program as the defining
procedure.
Puts the numbers stored in a and b
on the stack, then calls TORSA
with those arguments.
Completes the volume calculation
using the surface area.
Ends the defining procedure.
Puts the program on the stack.
Stores the program in TORSV.
RPL Programming 1-29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents