
MENU
Purpose
To create a menu and let the user to select an item by using (1) the shortcut keys or
(2) the UP/DOWN arrow keys, and then the ENTER key to confirm the selection.
Also, allow the use of the ESC key to cancel the current operation.
Syntax
A% = MENU(Item$)
Remarks
"A%" is an integer variable to be assigned to the result; it is the ordinal number of
the menu item that the user has selected.
"Item$" is a string variable, indicating the menu items that are separated and ended
by carriage return (CR, 0x0d).
Note that the following features are applied to the 8xxx series only -
Shortcut key: & (It is restricted to only one character next to &.)
Menu title: @ (The title can be put anywhere in the menu string.)
Display the Up/Down arrow icons
Example
Below is an illustrative example:
MENU_STR$ = "1 INFORMATION" + CHR$(13)
MENU_STR$ = MENU_STR$ + "@SYSTEM MENU" + CHR$(13)
MENU_STR$ = MENU_STR$ + "&2 SETTINGS" + CHR$(13)
MENU_STR$ = MENU_STR$ + "&3 TESTS" + CHR$(13)
MENU_STR$ = MENU_STR$ + "4 LOAD PROGRAM" + CHR$(13)
MENU_STR$ = MENU_STR$ + "&5 BLUETOOTH MENU" + CHR$(13)
...
S% = MENU(MENU_STR$)
...
POWER_ON
Purpose
To determine whether to restart or resume the program upon powering on.
Syntax
POWER_ON(N%)
Remarks
"N%" can be 0 or 1.
Value Meaning
0
1
Resume
Restart
Example
POWER_ON(0) ' set to resume mode
Comentarios a estos manuales