SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-18
Modal Prompts
a function key, the ACCEPT statement completes. The prompt is then cleared, and
the response to the prompt is returned in output parameter #answer.
•
?PROC Fileinfo uses parameter #subvol to display FUP information for #subvol.
•
?SECT EnterSubvol is executed when the script is invoked.
When the script in Example 5-8 is invoked:
•
?SECT EnterSubvol declares a global variable #subvol and positions the screen
buffer address beside the calling menu so that the prompt appears beside the
caller’s menu.
•
The ?PROC Prompt is called.
Example 5-8. Example of Modal Prompt Usage
?MENU Scratch
?PROC Prompt(#prompt,#answer)
{---------------------------- { Proc does a waited prompt.
PARM #prompt IN, { Format of <Prompt>[<response>]
#answer OUT; { Response returned in #answer.
PUSH #prompt & "<==?" { Make prompt text a production
ONTO scratch; { and store result in a cache.
WINDOW scratch MENU { Window on prompt text
GLASS HEAD "Prompt" { with no menu production,
CACHE LASTLINE FOR 1 { Text is last line of cache,
SIZE #SIZE #prompt+4; { and a width of prompt+4.
FLUSH; { Display window immediately !
ACCEPT #answer FKEYWAIT; { Do a waited (modal) accept
{ until an fkey is pressed.
CLEARW; UNLOCK; { When fkey is pressed, erase
{ prompt, unlock keyboard, and
RETURN; { return control to caller.
{ Response is in #answer.
?PROC FileInfo( #subvol )
{------------------------ { Proc does FUP INFO on #subvol
PARM #subvol;
TASK fup; { Declare fup task
WINDOW fup,"info " & #subvol & ".*" { Window on output
CACHE LASTLINE NOFRAME; { without waiting.
?SECT EnterSubvol
{---------------- { Popup up a prompt for subvol
VARIABLE #subvol; { Variable to contain subvol.
BESIDE; CW; { Position beside caller menu.
CALL Prompt ("Enter Subvol:[ ]", #subvol );
CALL FileInfo ( #subvol );