[OT] help w/ bitwise comparison operators
Kevin D. Clark
kclark at CetaceanNetworks.com
Fri Mar 21 14:05:43 EST 2003
Erik Price <eprice at ptc.com> writes:
> The short circuit operators AND (&&) and OR (||) work just like their
^^^^^^^^^^^^^^^
> regular counterparts except they stop evaluating once they "know" the
> result (AND stops evaluating if the first operand is false, and OR
> stops evaluating if the first operand is true).
You might be interested to know that (1 & 2) results in 0 wheras
(1 && 2) results in something non-zero...
Remember, operators like '&' are bit operators, wheras operators like
'&&' are logical operators. These are very different.
Regards,
--kevin
--
And don't tell me there isn't one bit of difference between null and
space, because that's exactly how much difference there is. :-)
--Larry Wall in <10209 at jpl-devvax.JPL.NASA.GOV>
More information about the gnhlug-discuss
mailing list