Reference Guide
1-46 RPL Programming
You can specify a help message and the type of data that must be entered in field by entering field specifications as
lists. For example,
{ { "Name:" "Enter your name" 2 } }
defines the Name field, displays
Enter your name
across the bottom of the input form, and accepts only object type 2 (strings) as input.
To set up a choose box:
1.
Enter a title string for the choose box.
2.
Enter a list of items. If this is a list of two-element lists, the first element is displayed in the choose box, and the
second element is returned to level 2 when OK is pressed.
3.
Enter a position number for the default highlighted item. (0 makes a view-only choose box.)
4.
Execute the CHOOSE command.
Example:
Enter a title
"FIRST ONE"
`
.
Enter a list of items
{ ONE TWO THREE }
`
.
Enter a position number for default highlighted value 3
`
.
Execute CHOOSE (
!°L%IN% %CHOOS%
).
Example:
The following choose box appears:
Example:
The following program uses input forms, choose boxes, and message boxes to create a simple phone list
database.
Program: Comments:
«
'NAMES' VTYPE
IF -1 ==
THEN { } 'NAMES' STO
END
Checks if the name list
(NAMES) exists, if not, creates
an empty one.
WHILE
"PHONELIST OPTIONS:"
{
{ "ADD A NAME" 1 }
{ "VIEW A NUMBER" 2 }
} 1 CHOOSE
While cancel is not pressed,
creates a choose box that lists
the database options. When
OK is pressed, the second
item in the list pair is returned
to the stack.
REPEAT → c «
Stores the returned value in c.
CASE c 1 ==
THEN
WHILE
Case 1 (ADD name), while
cancel is not pressed, do the
following: