Not: Difference between revisions

From The K Language Wiki
Content added Content deleted
("Remove lowercase again - it is in the template now")
("Add category")
Line 13: Line 13:
0 0 0 0 0 0
0 0 0 0 0 0
</pre>
</pre>

[[Category:Operator verbs]]

Revision as of 02:43, 9 July 2022

Not
~x

The not function, generally denoted by ~, gives the logical negation of an atom in K.

The not primitive is right atomic.

For numbers, returns 0 for nonzero numbers, and 1 if zero. characters also behave as integers.

 ~1 2 0
0 0 1

 ~"sadasd"
0 0 0 0 0 0