|
Using Menu(, you can easily create navigational menus. When the program executes the Menu( command it displays the specified items and pauses until the user selects an item. You can have up to seven different items.
Syntax:
Menu("title","text1",label1,"text2",label2,...)
The title is enclosed in quotation marks. Each item consists of a text description and a label to jump to; all separated with commas. The text description is enclosed in qquotation marks, the label is not.
Example:

Breakdown of code:
- Menu("A MENU","KANSAS",K,"UTAH",U)
- Creates the menu with two items. KANSAS with label K, and UTAH with label U.
- Lbl K
- Label K. Item 1 (KANSAS) will jump to this label.
- Disp "KANSAS"
- Display KANSAS on the screen.
- Stop
- Stop the execution of the program, and return to the home screen.
- Lbl U
- Label U. Item 2 (UTAH) will jump to this line label.
- Disp "UTAH"
- Display UTAH on the screen.
- Stop
- Stop the program execution and return to the home screen.
Program output:
User selects item 1...
Notice you do not need to clear the screen after a menu is displayed. This is done automatically.
|