SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-78
PA R M
{ If F16 is pressed then PARM "escape" returns a nonzero value.
{----------------------------------------------------------------}
PARM #firstName OUT { return first name
, #lastName OUT { return last name
, #address OUT { return address
, #phone OUT { phone number
, escape:=0 OUT { <> 0 implies escape.
;
VAR #name; { local variable #name
BESIDE; { Display Input panel
WINDOW person MENU { using person cache,
CACHE FIRST { from first line
UNTIL /*/ SIZE 45 { until *, 45 wide,
GLASS { with glass and head.
HEAD "Enter Person (F16-escape)";
FLUSH; { display it now!
LINE #MENULINE,#MENUCOL+#MENUWIDTH; { Accept from area.
ACCEPT #name, #address, #phone FKEYWAIT; { Accept into parms.
CW; { Clear input panel.
IF #FKEY=16 THEN BEGIN { Check for escape.
escape := 1; { flag escape.
RETURN; { return if escape.
END;
#firstName := #TAKE #name; { Parse first name
#lastName := #DROP #name; { Parse last name
{ return implied.
?PROC NextPerson ( esc );
{-----------------------}
{ This proc calls GetPerson, and if not escape then
{ displays a message on line twenty-five verifying
{ the data input. Note the script could then save
{ the data in cache or to a disc file, or data base.
{--------------------------------------------------}
PARM esc := 0 OUT; { <> 0 implies no more input.
VAR #first { First name (parsed)
,#last { Last name (parsed)
,#addr { address
,#ph { phone number
;
CALL GetPerson(#first, #last, #addr, #ph, esc);
IF esc THEN BEGIN
MSG "Done."
RETURN;
END;
MSG #last &", "& #addr &", "& #ph;
{MSG = Smith, 500 Park, Anytown, IL, 708-555-5555
?SECT main
{---------}
VAR done:=0;
MSG "Enter person data.";
WHILE NOT done DO BEGIN
CALL NextPerson(done);
END;