XP is just a number | |
PerlMonks |
Re^3: The mystery of double negation (bool 0)by tye (Sage) |
on Jul 12, 2015 at 22:51 UTC ( [id://1134431]=note: print w/replies, xml ) | Need Help?? |
The point of Double Negation is casting [...] any false value to 0.Nope, it's bitwise negation and doesn't work this way. It's basically - noop. Keeps value the same. Um:
So it could be an idiom that is applied to all Boolean values (so that Boolean false shows up as '0' instead of as the "invisible" ''). It just does nothing when the Boolean value is already 1. - tye
In Section
Seekers of Perl Wisdom
|
|