CALLS program instruction CALLS program instruction Syntax CALLS string( arg_list ) Function Suspend execution of the current program and continue execution with a new program (that is, a subroutine) specified with a string value. Usage Considerations CALLS takes much longer to execute than the normal CALL instruction. Thus, CALLS should be used only when necessary. Parameters string String value, variable, or expression defining the (1- to 15-character) name of the new program to be executed. (The letters in the name can be lowercase or uppercase.) arg_list Optional list of arguments to be passed between the current program and the new program.
The parentheses can be omitted if no argument list is specified. (See the CALL instruction for further information on subroutine arguments.) NOTE: Since the argument list is not specified as part of the string parameter, all the subroutines called by a specific CALLS instruction must have equivalent argument lists. Details The CALLS instruction behaves exactly as the CALL instruction does. The only difference between the two instructions is the way the subroutine name is specified. CALL requires that the name be explicitly entered in the instruction step. CALLS permits the name to be specified by a string variable or expression, which can have its value defined when the program is executed.
That allows the program to call different subroutines depending on the circumstances. As with the CALL instruction, execution automatically returns to the current program when a RETURN instruction is executed in the subroutine. Execution continues with the instruction immediately following the CALLS instruction. For some applications, the CALLP instruction is much more efficient than CALLS. See the CALLP instruction for details. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 114