CALLP program instruction CALLP program instruction Syntax CALLP var (arg_list) Function Call a program given a pointer to the program in memory. Usage Considerations Using SYMBOL.PTR and CALLP is an alternative to using CALLS to invoke a eV+ subroutine given its name as string data. For some applications, the SYMBOL.PTR-CALLP combination is much faster than CALLS. Parameters var A real variable (not an expression) that contains a pointer to a program symbol. arg_list A list of arguments to be passed between the current program and the new program.
Details In situations where the same program is called multiple times, the CALLP instruction can be significantly more efficient than the CALLS instruction. This is especially true in systems that have many programs loaded. (In situations where a program is called only once, the CALLS instruction is faster.) When a CALLS instruction is used, the following steps are performed each time the CALLS instruction is encountered: 1. The user string is evaluated. 2. The eV+ program symbol with that name is found in the eV+ symbol table. 3. The proper eV+ program is called. As an alternative, the SYMBOL.PTR function can be used to perform the first two steps.
Typically, that is done one time, during the initialization portion of the application software. Then, in place of the CALLS instruction, a CALLP instruction can be used to perform the third step above. (The CALLP instruction is just slightly slower than a CALL instruction.) In situations where the same program is called multiple times, avoiding the first two steps of CALLS can be significant, especially in systems that have many programs loaded. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 112