ADDS function
Syntax
ADDS (array1, array2)
CALL -ADDS (return.array, array1, array2)
CALL !ADDS (return.array, array1, array2)
Description
Use the ADDS function to create a dynamic array of the element-by-element addition of two dynamic arrays.
Each element of array1 is added to the corresponding element of array2. The result is returned in the corresponding element of a new dynamic array. If an element of one array has no corresponding element in the other array, the existing element is returned. If an element of one array is the null value, null is returned for the sum of the corresponding elements.
If you use the subroutine syntax, the resulting dynamic array is returned as return.array.
Example
A = 2:@VM:4:@VM:6:@SM:10
B = 1:@VM:2:@VM:3:@VM:4
PRINT ADDS(A,B)
This is the program output:
3V6V9S10V4