Program: |
| Comments: |
|
|
|
« |
|
|
"Key in S.S. #" | Prompt string. | |
{ " - - | " | |
|
| before the first |
|
| between, and 4 spaces after the |
|
| last |
INPUT |
| Suspends the program for input. |
DUP 1 3 SUB |
| Copies the result string, then |
SWAP |
| extracts the first three and last |
8 11 SUB |
| four digits in string form. |
» |
|
|
|
|
|
OSSEC ‰ |
| Stores the program in SSEC. |
|
|
|
Using INFORM and CHOOSE for Input
You can use input forms (dialog boxes), and choose boxes for program input. Program that contain input forms or choose boxes wait until you acknowledge them (%OK% or −) before they continue execution.
If OK is pressed, CHOOSE returns the selected item (or its designated returned value) to level 2 and a 1 to level 1. INFORM returns a list of field values to level 2 and 1 to level 1.
Both the INFORM and CHOOSE commands return 0 if CANCEL is pressed.
To set up an input form:
1.Enter a title string for the input for the input form (use @Õ).
2.Enter a list of field specifications.
3.Enter a list of format options.
4.Enter a list of reset values (values that appear when RESET is pressed).
5.Enter a list of default values.
6.Execute the INFORM command.
Example: Enter a title "FIRST ONE" `. Specify a field { "Name:" } `.
Enter format options (one column, tabs stop width five) { 1 5 } `.
Enter reset value for the field { "THERESA" } `. Enter default value for the field { "WENDY" } `. Execute INFORM (!°L%IN%%INFOR%).
The screen on the left appears. Press L%RESET%%OK% and the screen on the right appears.
RPL Programming