Qbasicnews.com

Full Version: logical operators Q
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Quote:AND is also inefficient. It checks each truth value and doesn't exit out once a FALSE is reached.

Yeah, that is what i am saying, but how do you get around testing both expressions with OR, NOT, XOR, and EQV? You can't.
With OR, AND, and IMP, you don't need to test both expressions.

With XOR and EQV... well I suppose that could be left...
I don't know about IMP (what is it?), but with XOR you must test both expressions.
Lets say you have this:
Code:
IF a = 10 XOR b = 20 THEN...

If the first expression is true, you need to keep testing to see if the other is false. And vice versa. But you are correct with OR.
IMP (implies) is a bit silly, but it's still there.

"a IMP b" is the same thing as "a"

As in, if A is true, then TRUE ELSE FALSE......
Pages: 1 2 3