[thelist] Testing for the various NULL's (Result!)

Joel Canfield joel at spinhead.com
Fri Dec 6 15:07:01 CST 2002


--
[ Picked text/plain from multipart/alternative ]
> What's even more weird is that these tests failed when on the
> same line separated by an OR. They where however, successful
> as you see them here, on different lines.

ALERT: LOGIC LESSON APPROACHING . . .

Uh, that woulda been 'AND', not 'OR' to make that work.

Think about it: you're saying "If it's not this, OR, if it's not that, go
ahead." Well, Unless 'this' and 'that' are identical, every blamed thing in
the universe will be NOT at least *one* of 'em, right? I mean, if it's
'this' then it's not 'that', and vice versa. So, it ALWAYS equates to true,
and fires whatever code you've got.

Now, if you say, "If it's not this, AND it's not that, go ahead" that's a
different matter. As long as it ain't 'this' or 'that', you get the response
you expected.

Short version: two NOTs connected by an OR always yield TRUE

joel



More information about the thelist mailing list