Skip to main content

NOTS

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

Synopsis

NOTS(dynarray)

Arguments

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

Description

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.

Examples

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

a=7:@VM:"-7.1":@VM:"7dwarves":@VM:0:@VM:"":@VM:"fred"
PRINT NOTS(a)
      ! Returns 0ý0ý0ý1ý1ý1

See Also

FeedbackOpens in a new tab