null¶
Is null
null x null[x]
Returns 1b where x is null.
Applies to all data types except enums, and to items of lists, dict values and table columns.
null is an atomic function.
Enums always show as non-null.
q)a:``a
q)`=`a$` / non-enumerated and enumerated null symbol show as equivalent
1b
q)null` / null symbol behaves as expected
1b
q)null`a$` / enumeration of null symbol does not
0b
The intention was not to have nulls in the enums. That value is used to indicate out of range. (Think of them as a way to represent foreign keys.) To test for an enumeration backed by a null symbol, one can use the equality test – but at the cost of CPU cycles:
null is a multithreaded primitive.