HP 50g User's Reference Manual
Download Advanced user's reference manual of HP 48gII Calculator for Free or View it Online on All-Guides.com.
Brand: HP
Category: Calculator
Type: Advanced user's reference manual
Model: HP 48gII , HP 49g+ , HP 50G
Pages: 693
RPL Programming 1-33
Single-Step Operations
Key Programmable
Command
Description
!°LL%RUN%
:
%DBUG%
DBUG Starts program execution, then suspends it as if HALT were the first
program comm
and. Takes as its argument the program or program name
in level 1.
%SST%
Executes the next object or command in the suspended program.
%SST°%
Same as
%SST%
, except if the next program step is a subroutine, single-steps
to the first step in that subroutine.
%NEXT%
Displays the next one or two objects, but does not execute them. The
display persists until the next keystroke.
%HALT%
HALT Suspends program execution at the location of the HALT command in
the program.
%KILL%
KILL Cancels all suspended programs and turns off the HLT annunciator.
!=
CONT Resumes execution of a halted program.
Trapping Errors
If you attempt an invalid operation from the keyboard, the operation is not executed and an error message appears.
For example, if you execute + with a vector and a real number on the stack, the calculator returns the message
+
Error: Bad Argument Type
and returns the arguments to the stack (if Last Arguments is enabled).
In a program, the same thing happens, but program execution is also aborted. If you anticipate error conditions,
your program can process them without interrupting execution.
For simple programs, you can run the program again if it stops with an error. For other programs, you can design
them to trap errors and continue executing. You can also create user-defined errors to trap certain conditions in
programs. The error trapping commands are located in the PRG ERROR menu.
Causing and Analyzing Errors
Many conditions are automatically recognized by the calculator as error conditions — and they’re automatically
treated as errors in programs.
You can also define conditions that cause errors. You can cause a user-defined error (with a user-defined error message)
— or you can cause a built-in error. Normally, you’ll include a conditional or loop structure with a test for the error
condition — and if it occurs, you’ll cause the user-defined or built-in error to occur.
To cause a user-defined error to occur in a program:
1.
Enter a string (with
""
delimiters) containing the desired error message.
2.
Enter the DOERR command (PRG ERROR menu).