CALL program instruction CALL example(a[1,2]) ---> .PROGRAM example(b) CALL example(a[1,2,3]) ---> .PROGRAM example(b) l One dimension of an array passed to a one-dimensional array: CALL example(a[]) ---> .PROGRAM example(b[]) CALL example(a[1,]) ---> .PROGRAM example(b[]) CALL example(a[1,2,]) ---> .PROGRAM example(b[]) l Two dimensions of an array passed to a two-dimensional array: CALL example(a[,]) ---> .PROGRAM example(b[,]) CALL example(a[1,,]) ---> .PROGRAM example(b[,]) l Three dimensions of an array passed to a three-dimensional array:
CALL example(a[,,]) ---> .PROGRAM example(b[,,]) Examples CALL pallet(count) Branches to the program named pallet, passing to it a pointer to the variable count. When a RETURN instruction is executed, control returns to the program containing the CALL instruction and count will contain the current value of the corresponding subroutine argument. CALL cycle(1, , n+3) Branches to the program named cycle. The value 1 is passed to the first parameter of cycle, its second parameter is undefined, and its third parameter receives the value of the expression n+3.
(If cycle has more than three parameters, the remaining parameters are all undefined.) Because none of the arguments in the CALL are variables, no data will be returned by the program cycle. Related Keywords CALLP program instruction CALLS program instruction .PROGRAM program instruction RETURN program instruction eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 111