2,951
edits
m (Text replacement - "{{APL built-ins}}" to "{{APL built-ins}}Category:Primitive functions") |
(→Extensions: Fix K extension (=, not ≠)) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Built-in|Not|~}} is a | {{Built-in|Not|~}} is a [[monadic]] [[scalar function]] that returns the [[wikipedia:Negation|logical negation]] of a [[Boolean]] argument—that is, 0 if the argument is 1 and 1 if it is 0. In some languages, such as [[J]], it is extended so that Not <source lang=apl inline>x</source> is equivalent to <source lang=apl inline>1-x</source> while in others, such as [[K]], it is extended so that Not <source lang=apl inline>x</source> is equivalent to <source lang=apl inline>0=x</source>. | ||
== Examples == | == Examples == | ||
Line 32: | Line 32: | ||
| None || [[APL\360]], [[APL2]], [[APLX]], [[SHARP APL]], [[Dyalog APL]], [[GNU APL]], [[ngn/apl]], [[dzaima/APL]] | | None || [[APL\360]], [[APL2]], [[APLX]], [[SHARP APL]], [[Dyalog APL]], [[GNU APL]], [[ngn/apl]], [[dzaima/APL]] | ||
|- | |- | ||
| <source lang=apl inline>1-⍵</source> || [[J]] | | <source lang=apl inline>1-⍵</source> || [[J]], [[BQN]], [[Extended Dyalog APL]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>0=⍵</source> || [[K]] | ||
|} | |} | ||
== See also == | |||
* [[Negate]] | |||
* [[Nor]] | |||
* [[Nand]] | |||
* [[Not Equal to]] | |||
* [[Not Match]] | |||
== External links == | == External links == | ||
Line 45: | Line 52: | ||
=== Documentation === | === Documentation === | ||
* [ | * [https://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Not.htm Dyalog] | ||
* [http://microapl.com/apl_help/ch_020_020_400.htm APLX] | * [http://microapl.com/apl_help/ch_020_020_400.htm APLX] | ||
* J [https://www.jsoftware.com/help/dictionary/d121.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/minusdot NuVoc] | * J [https://www.jsoftware.com/help/dictionary/d121.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/minusdot NuVoc] | ||
* [https://mlochbaum.github.io/BQN/doc/logic.html BQN] | |||
{{APL built-ins}}[[Category:Primitive functions]] | {{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar monadic functions]] |