Building USER Menus

The KEYDEF and READMENU commands allow you to build complex interactive menus for your user-de￿ned functions. Keys that you create are displayed by pressing the 4USER5 key. Up to 14 keys can be displayed at one time in the 4USER5 menu. The keys are numbered 1 through 14, keys 1 and 8 occupying the upper right and left corners, respectively. The following example, the HIGH PEAK function is assigned to softkey 7 and labeled \FIND PEAK." To execute the HIGH PEAK function, press 4LOCAL5, 4USER5,

NNNNNNNFINDNNNNNNNNNNNNNNNNNNNNPEAK .

10 OUTPUT 723;"KEYDEF 7,HIGH_PEAK,$FIND PEAK$;"

Use the READMENU command to create interactive 4USER5 key menus. In the following example, READMENU works with the IF/THEN/ELSE commands to build a 4USER5 key menu that activates three di￿erent wavelength ranges, called bands A, B, and C. Whenever a key is pressed, the READMENU command transfers the key number to a user-de￿ned variable. The IF/THEN/ELSE commands then test the key number and activate the associated function. The REPEAT/UNTIL commands repeat the key-testing process until the exit key is pressed.

6-14