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-49
Using KEY for Keystroke Input
You can use KEY inside an indefinite loop to “pause” execution until any key — or a certain key — is pressed.
To enter a KEY loop in a program
1.
Enter the loop structure.
2.
In the test-clause sequence, enter the KEY command (PRG IN menu) plus any necessary test commands.
3.
In the loop-clause, enter no commands to give the appearance of a “paused” condition.
KEY returns 0 to level 1 when the loop begins. It continues to return 0 until a key is pressed — then it returns 1 to
level 1 and the two-digit row-column number of the pressed key to level 2. For example, `returns 105, and !
returns 81.)
The test-clause should normally cause the loop to repeat until a key is pressed. If a key is pressed, you can use
comparison tests to check the value of the key number. (See “Using Indefinite Loop Structures” on page 1-22 and
“Using Comparison Functions” on page 1-11.)
To respond to a KEY loop while running a program:
Press any key. (A prefix key such as
!
or
~
is a valid key.)
Example:
The following program segment returns 1 to level 1 if
+
is pressed, or 0 to level 1 if any other key is
pressed:
«
…
DO UNTIL KEY END 95 ==
…
»
Output
You can determine how a program presents its output. You can make the output more recognizable using the
techniques described in this section.
Data Output Commands
Key Command Description
!°L%OUT%
:
%PVIEW%
PVIEW Displays PICT starting at the given coordinates.
%TEXT%
TEXT Displays the stack display.
%CLLCD%
CLLCD Blanks the stack display.
%DISP%
DISP
Displays an object in the specified line.
%FREEZ%
FREEZE “Freezes” a specified area of the display until a key press.
%MSGBO%
MSGBOX Creates a user-defined message box.
%BEEP%
BEEP Sounds a beep at a specified frequency (in hertz, level 2)
and duration (in seconds, level 1).