Creating Downloadable Programs
Building USER Menus
10 CLEAR 723
20OUTPUT 723;"IP;DISPOSE ALL;"
30!
40 | OUTPUT 723;"FUNCDEF BANDA,@STARTWL 600NM;STOPWL 900NM;@;" | Band A. |
|
|
|
|
|
|
|
|
| |||
50 | OUTPUT 723;"FUNCDEF BANDB,@STARTWL 900NM;STOPWL | Band B |
|
|
|
|
|
|
|
|
| |||
1200NM;@;" |
|
|
|
|
|
|
|
|
|
|
|
|
| |
60 | OUTPUT 723;"FUNCDEF BANDC,@STARTWL 1200NM;STOPWL | Band C |
|
|
|
|
|
|
|
|
| |||
1700NM;@;" |
|
|
|
|
|
|
|
|
|
|
|
|
| |
70 | ! |
|
|
|
|
|
|
|
|
|
|
|
|
|
80 | OUTPUT 723;"VARDEF KEY,0;" | Variable for storing key number . |
|
| ||||||||||
90 | OUTPUT 723;"VARDEF END_LOOP,0;" | Declare variable for monitoring REPEA T | ||||||||||||
|
|
|
|
| loop. |
|
|
|
|
|
|
|
|
|
100 | ! |
|
|
|
|
|
|
|
|
|
|
|
|
|
110 | OUTPUT | 723;"REPEAT;" | Begin repeat loop. |
|
|
|
|
| ||||||
160 | OUTPUT 723;"READMENU KEY,1,$BAND | Assign labels to | 4 |
| 5 keys 1, | 2, | 3, | |||||||
USER | ||||||||||||||
A$,2,$BANDB$,3,$BANDC$,14,$EXIT$;"; | and 14. | Store | number | in | ||||||||||
|
|
|
|
| variable, KEY. |
|
|
|
|
|
|
|
| |
180 | OUTPUT 723; | "IF KEY,EQ,1;THEN;BANDA;"; | Evaluate | KEY to execute function. |
|
| ||||||||
190 | OUTPUT | 723;" | ELSIF | KEY,EQ,2;THEN;BANDB;"; |
|
|
|
|
|
|
|
|
|
|
200 | OUTPUT | 723;" | ELSIF | KEY,EQ,3;THEN;BANDC;"; |
|
|
|
|
|
|
|
|
|
|
210 | OUTPUT | 723;" | ELSIF | KEY,EQ,14;THEN;MOV END_LOOP,1;"; | When key 14 is pressed, | END |
|
| LOOP | |||||
| ||||||||||||||
|
|
|
|
| contains a \1" and ends repeat loop. |
| ||||||||
220 | OUTPUT | 723;" | ENDIF;"; |
|
|
|
|
|
|
|
|
|
| |
230 | OUTPUT 723;"UNTIL | END_LO0P,EQ,1;" |
|
|
|
|
|
|
|
|
|
| ||
240 | END |
|
|
|
|
|
|
|
|
|
|
|
|
|
With further use of the READMENU, KEYDEF, and FUNCDEF commands, you can assign a 4USER5 key menu to a 4USER5 key that can be activated by yet another 4USER5 key, thus creating multilevel menus. The above example has been altered slightly in the next example to demonstrate one way of assigning a menu to another 4USER5 key. The entire program algorithm is incorporated into a