next up previous index
Next: RETURN: Return from a Up: VISTA Command Procedure Scripts Previous: GO: Start Procedure Execution   Index

CALL: Call a Procedure as a Subroutine


\begin{command}
\item[\textbf{Form: } CALL procedure\_filename {[parameter1]} {...
...r1,2,...]{are optional parameters passed to the called procedure.}
\end{command}

CALL tells VISTA to save the contents of its current procedure buffer, read in the desired procedure file, and begin execution at its first line. The CALL command can be executed directly in the immediate input mode, or be used inside procedures to call other procedures. In both cases, at the completion of the called procedure, VISTA will return properly to either the input mode or calling procedure. VISTA will support up to 10 levels or subroutine calls. If an error occurs while a called procedure is executing, VISTA will unwind and display the complete subroutine stack.

A procedure is allowed a maximum length of 2500 lines, and each line is allowed a maximum length of 80 characters. If your procedures or lines exceed this maximum, they will be truncated.

Parameters can optionally be passed to the procedure. These can be numeric or string parameters. The parameters are evaluated by the procedure using the PARAMETER command.

Examples: Assume the default procedure directory is /vista/procedure and the default extension is .pro.
\begin{example}
\item[CALL medfly\hfill]{executes /vista/procedure/medfly.pro}
...
...xecutes /vista/procedure/medfly.pro
passing it the parameter KILL}
\end{example}


next up previous index
Next: RETURN: Return from a Up: VISTA Command Procedure Scripts Previous: GO: Start Procedure Execution   Index
Jon Holtzman 2002-02-13