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
3.In the
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
The
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 |
%BEEP% | BEEP | Sounds a beep at a specified frequency (in hertz, level 2) |
|
| and duration (in seconds, level 1). |
|
|
|
RPL Programming