Documentation for routine not
assembled from the following pages:
Language documentation: Operators §
From Operators
(Operators) prefix not §
multi sub prefix:<not>(Mu --> Bool)
Evaluates its argument in Boolean context (and thus collapses Junctions), and negates the result. Please note that not
is easy to misuse. See traps.
Class: Mu §
From Mu
(Mu) method not §
method not()
Evaluates the item in Boolean context (leading to final evaluation of Junctions, for instance), and negates the result. It is the opposite of so
and its behavior is equivalent to the !
operator.
my = <-a -e -b>;my = any() eq '-v' | '-V';if .not # OUTPUT: «Verbose option not present in arguments»
Since there is also a prefix version of not
, this example reads better as:
my = <-a -e -b>;my = any() eq '-v' | '-V';if not # OUTPUT: «Verbose option not present in arguments»