Mathmatically, zero is neither positive or negative. What you see is the result of Perl fudging a little.
Also, there is no "flag" value for negative numbers, at least not in the way you're probably thinking. See Twos-complement on Wikipedia. Although the concept is more complex than a simple flag value, it ends up simplifying the logic required for using signed numbers.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: Applying Sign Bit
by hardburn
in thread Applying Sign Bit
by budman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |