[TUHS] C question for the historians
imp at bsdimp.com
Thu Nov 9 06:36:40 AEST 2017
On Wed, Nov 8, 2017 at 12:05 PM, Larry McVoy <lm at mcvoy.com> wrote:
> On Wed, Nov 08, 2017 at 06:14:20PM +0000, Ralph Corderoy wrote:
> > is better then why stop there? Why not
> > if (((w & MASK) != FALSE) == TRUE)
> Thanks for this, that's the perfect come back to the pedantic folks.
It's also wrong. You couldn't flip it around to write
if (((w & MASK) == TRUE) == TRUE)
because that only works when MASK == 1. So it's dangerous since you can't
apply the normal laws of algebra on it because you are comparing BOOLEANS
and MASKS, which has always ended in pain...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS