next up previous index
Next: VERIFY: Verify (Trace) Procedure Up: VISTA Command Procedure Scripts Previous: RETURN: Return from a   Index

PARAMETER: Pass Arguments to a Procedure


\begin{command}
\item[\textbf{Form: } PARAMETER {[varname]} {[varname]} {[STRING=string\_var]} ...\hfill]{}
\end{command}
PARAMETER evaluate parameters passed to a procedure. An example will show best how PARAMETER works. Suppose the following command was typed:
\begin{hanging}
\item{CALL TEST 2 X IMAGEFILE}
\end{hanging}
The parameter list portion of the command line is saved, i.e. '2 X IMAGEFILE'. The procedure TEST.PRO is then called. TEST has in it the command
\begin{hanging}
\item{PARAMETER BUFNUM FACTOR STRING=FILENAME}
\end{hanging}
BUFNUM and FACTOR are taken to be variable names and are associated with the first two parameters from the parameter list. In effect it does the command SET BUFNUM=2 FACTOR=X. Note that '2' and 'X' could have been any arithmetic expression.

The STRING= keyword means that the third parameter is used as a literal string and the string variable name FILENAME is given the string value IMAGENAME, in effect doing the command:
\begin{hanging}
\item{STRING FILENAME IMAGENAME}
\end{hanging}

If there are fewer parameters in the CALL than required in the PARAMETER command, the missing parameters are taken to be 0 or blank, as appropriate.

Note that there is only one area in VISTA for saving the list of passed parameters, so the PARAMETER command should be executed before calling another procedure.


next up previous index
Next: VERIFY: Verify (Trace) Procedure Up: VISTA Command Procedure Scripts Previous: RETURN: Return from a   Index
Jon Holtzman 2002-02-13