Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
IFS Function (DataBasic) (m618703+ifs_f.htm)
Selects elements from two dynamic arrays, depending on the logical values of elements in a third array.
IFS(dynArray, trueArray, falseArray)
dynArray, trueArray, falseArray
DataBasic expressions
that evaluate to dynamic arrays.
A dynamic array with the same structure as dynArray, formed by combining elements from trueArray and falseArray. Each element in the new array contains the corresponding element from either trueArray or falseArray, depending on the logical (true or false) value of that element in dynArray. If there is no corresponding element in trueArray or falseArray (as appropriate), the element concerned is set to null.
For details of the logical values of different types of element, refer to Logical Expressions.
Missing elements (those that appear in one array, but not in the other) are treated as null.
ARY = @TRUE:@VM:@FALSE TARY = "John":@VM:"Paul" FARY = "George":@VM:"Ringo" NEWARY = IFS(ARY, TARY, FARY)
Sets NEWARY to "JohnVMRingo".