SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-6
Menus
When you point the cursor to a menu line representing a device type and press Return,
a PUP Listdev for the selected device type appears next to the device type menu, as
Figure 5-1 shows.
Default Productions
You can declare menus with a default production. When you declare a default
production for a menu, the text lines that do not have a production associated with
them automatically use the default. The default production lets you associate common
procedural rules with a list of objects. (See Example 5-4.)
Figure 5-1. SeeView Output From the Program in Example 5-3
Example 5-4. Example of a Default and Shift Production (page 1 of 2)
?MENU DevTypes { Declare cache "DevTypes"
{-------------}
Disk { The main section associates
Tape { the default production
Term { CALL Listdev (#menutext)
Printer { with the DevTypes window.
Expand <== CALL Listdev ("TYPE 63") { This production overrides default.
*
?PROC Listdev ( #DeviceType ) { Declare procedure "Listdev"
{---------------------------}
PARM #DeviceType; { #DeviceType is caller’s parameter
TASK pup; { Assert PUP task/process.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType { Window on Pup output from Listdev
NOCURSOR { Don't move cursor to pup window.
NOFRAME { Don't re-draw window if exists.
CACHE LASTLINE; { Don't wait for pup response.
?PROC HelpDev ( #DeviceName ) { Declare procedure "HelpDev"
{---------------------------}
Parm #DeviceName; { DeviceName is caller’s parameter
MSG "Shift-Return displays help, Return displays " & #DeviceName;