IFS function
Syntax
IFS (dynamic.array, true.array, false.array)
CALL -IFS (return.array, dynamic.array, true.array, false.array)
CALL !IFS (return.array, dynamic.array, true.array, false.array)
Description
Use the IFS function to return a dynamic array whose elements are chosen individually from one of two dynamic arrays based on the contents of a third dynamic array.
Each element of dynamic.array is evaluated. If the element evaluates to true, the corresponding element from true.array is returned to the same element of a new dynamic array. If the element evaluates to false, the corresponding element from false.array is returned. If there is no corresponding element in the correct response array, an empty string is returned for that element. If an element is the null value, that element evaluates to false.
If you use the subroutine syntax, the resulting dynamic array is returned as return.array.