Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section


Returns the logical complement of each element of a dynamic array.




dynarray An expression that resolves to a dynamic array of boolean values.


The NOTS function returns the logical complement (inverse) of each element of a dynamic array. It returns a dynamic array of boolean values corresponding to the elements of dynarray.

All expressions that evaluate to 0 become 1, and all expressions that evaluate to a non-zero numeric value become 0. A string is parsed as a number until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7, and thus returns 0. If an element is missing or contains the null string or a non-numeric value, NOTS parses it as 0, and thus returns 1 for that element.

You can use the ANDS and ORS functions to perform logical comparisons on two dynamic arrays.


The following example uses the NOTS function to return the logical complement of the elements of a dynamic array:

      ! Returns 0ý0ý0ý1ý1ý1
Copy code to clipboard

See Also