====== WINUS ====== WINUS displays the specified menu. WINUS(menu, comnand, code, level, image) ==== Using WINUS ==== If //menu// is anchored, the selections are processed by the system subroutine CATALYST and the user is prompted for another selection, exiting the menu only by pressing [Esc]. For unanchored menus, WINUS returns the selected process in code and command. Note that the values returned in this case are to be interpreted by the calling environment and need not be arguments acceptable to CATALYST. ==== Parameters ==== === menu === Use //menu// to pass the name of a menu record (case sensitive). Menu must exist in the MENUS file (searched first) or the SYS.MENUS file. === command === WINUS returns in //command// a calling environment command for the user selection. If //menu// is anchored, this value is passed as the command argument to the system subĀ­routine CATALYST (see CATALYST). === code === WINUS returns in //code// a calling environment code for the user selection. If //menu// is anchored, this value is passed as the code argument to the system subroutine CATALYST (see CATALYST). === level === Use //level// to pass an integer from 0 to 4 to specify the menu's horizontal placement (top of the screen is 0, bottom is 4). Values greater than 4 or less than 0 cause a wrap-around effect. The default value is 0. === image === WINUS returns in //image// the current display image during an initial (first level) call to store . In subsequent calls to WINUS, this value must be passed in //image// in order to properly restore the display. In the initial call, //image// should be null. ==== Values Returned ==== WINUS passes the selected calling environment process in the argument list code and command parameters, if //menu// is not anchored. menu= "MAIN" WINUS(menu, command, code, level, image) MSG("An anchored menu:!Command= ":command:", code":code,"","","") * Display user selections in an unanchored menu. Menu= "PAINT" WINUS(menu, command, code, level, image) MSG("Command = %1%, Code = %2%", "", "", command:@FM:code) /* Display at level 2 and process user selections in an anchored menu. menu = "MAIN" level= 2 WINUS(menu, command, code, level, image) MSG("Command = %1%, Code = %2%", "", "", command:@FM:code) /* Display user selections in an unanchored menu and pass the returned values to MSG. */ menu= "PAINT" WINUS(menu, command, code, level, image) MSG("Command = %1%, Code = %2%", "", "", command:@FM:code)