not¶
Not zero
not x not[x]
Returns 1b where x is equal to zero, and 0b otherwise.
not applies to all datatypes except symbol and GUID, and to items of lists, dictionary values, and table columns. It tests the underlying data value.
Nulls and infinities never equal zero.
q)not -1 0 1 2
0100b
q)not "abc","c"$0
0001b
q)not `a`b!(-1 0 2;"abc","c"$0)
a| 010b
b| 0001b
q)not 2000.01.01 2020.06.30
10b
q)not 00:00:00
1b
q)not 12:00:00.000000000
0b
q)not (0W;-0w;0N)
000b
not is an atomic function.
not is a multithreaded primitive.
Q for Mortals
§4.3.2 Not Zero not