SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-76
PA R M
PARM
The PARM statement declares procedure parameter variable names and data types
(#string or integer). Use the CALL statement to pass parameters to a procedure (see
the CALL statement.) You can pass parameters either by value (IN) or by reference (IO
or OUT).
variable
specifies a procedure parameter variable name.
:= initialization-exp
declares the initial value of the variable. You can use an initialization expression to
specify the initial value of the parameter being declared. For example:
When PARM is a by-value parameter with an initialization expression specified
(such as width:= 80 above) and the caller passes that parameter (as in CALL
DrawTaclWindow(60);) the value passed by the caller is the initial value of the
parameter (width 60) rather than the value of the initialization expression (width
80). If the caller does not supply the parameter, the initialization expression is the
value of the parameter. Thus width is 80 for CALL DrawTaclWindow.
When PARM is a by-reference parameter (indicated with IO or OUT) and you
specify an initialization expression, such as error:=0, the initial value is that of the
initialization expression, regardless of whether you supply a parameter.
All procedure parameters are optional. You do not need to supply even OUT
parameters. The interpreter automatically handles these unresolved references.
IN
indicates that the variable is a by-value parameter. Value assignments within the
procedure are not returned to the caller. This value is the default.
PARM variable [ := initialization ] [ IN | IO | OUT ]
[, variable … ]
?PROC DrawTaclWindow ( width, height, error )
{-------------------------------------------}
PARM width := 80 IN; (default input value)
PARM height := 24 IN; (default input value)
PARM error := 0 OUT; (default output value)
TASK tacl ALLOWERROR;
IF #TASKERRORTYPE THEN BEGIN
error := #TASKERRORTYPE;
return;
END;
WINDOW * SIZE width,height;