Unconditional Branch Instructions arg_list is the list of arguments being passed to the subroutine. These arguments can be passed either by value or by reference and must agree with the arguments expected by the program being called. Subroutines and argument lists are described in "Subroutines." The code: 48 . 49 CALL check_data(locx, locy, length) 50 . suspends execution of the calling program, passes the arguments locx, locy, and length to program check_data, executes check_data, and (after check_data has completed execution) resumes execution of the calling program at step 50. CALLS The CALLS instruction is identical to the CALL instruction except for the specification of program .
For a CALLS instruction, program is a string value, variable, or expression. This allows you to call different subroutines under different conditions using the same line of code. (These different subroutines must have the same arg_list.) You can use this technique to create "virtual functions" in object oriented languages like C++, C#, Java or Python. The code: 47 . 48 $program_name = $program_list[program_select] 49 CALLS $program_name(length, width) 50 .
suspends execution of the calling program, passes the parameters length and width to the program specified by array index program_select from the array $program_list, executes the specified program, and resume execution of the calling program at step 50. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 61