CALL program instruction CALL program instruction Syntax CALL program( arg_list ) Function Suspend execution of the current program and continue execution with a new program (that is, a subroutine). Parameters program Name of the new program to be executed. arg_list Optional list of subroutine arguments (separated by commas) to be passed between the current program and the new program. (If no argument list is specified, the parentheses after the program parameter can be omitted.) Arguments can be used to pass data to the called program, to receive results back, or a combination of both.
(How arguments are passed is described below.) Each argument can be any one of the data types supported by eV+ (that is, belt, precision point, real-value, string, and transformation), and can be specified as a constant, a variable, or an expression. 1 The type of each argument must match the type of its counterpart in the argument list of the called program. An argument specified as a variable can be a simple variable, an array element, or an array with one or more of its indexes left blank. (See below for more information.) NOTE: If a value is being passed back to the calling program, the parameter must be specified as a variable.
Any argument can be omitted, with the result that the corresponding argument in the called program will be undefined. If an argument is omitted within the argument list, the separating comma must still be included. If an argument is omitted at the end of the list, the comma preceding the argument can also be omitted. (See the description of .PROGRAM for more information on the effect of omitting an argument.) eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 109