Method `!()
- Method `!
bool `!(object|function(:void) arg)
int(1..1) `!(int(0..0) arg)
int(0..0) `!(mixed arg)- Description
Logical not.
Every expression with the
!operator becomes a call to this function, i.e.!ais the same aspredef::`!(a).It's also used when necessary to test truth on objects, i.e. in a statement
if (o) ...whereois an object, the test becomes the equivalent of!!oso that any lfun::`!() the object might have gets called.- Returns
If arg is an object that implements lfun::`!(), that function will be called.
If arg is
0(zero), a destructed object, or a function in a destructed object,1will be returned.Otherwise
0(zero) will be returned.- Note
No float is considered false, not even
0.0.- See also