EQV and IMP are also correct.
Aga,
why do you use
Code:
IF ... THEN
ELSE
IF ... THEN
END IF
END IF
rather than the shorter form
Code:
IF ... THEN
ELSEIF ... THEN
END IF
It is not that it really matters. I assume they execute the same, but your method requires one more END IF that you could forget.
Quote:That's right........
................
Yeah, as I said, I was thinking in prolog
Quote:Yeah, as I said, I was thinking in prolog
Yeah, defintely too much pot. Next thing you'll be programming in Prolog :o.
Aga, whats all this for anyway?
Another useless utility:
a converter to IF... THEN form, since it's more efficient..
Quote:Another useless utility:
a converter to IF... THEN form, since it's more efficient..
Is that because if you do this:
Even is a = 5, it will still test the b = 1 expression? That shouldn't be much of a difference at all, but eiether way, you couldn't get around it with OR, XOR, NOT, EQV, and probably IMP, but I don't know what that is.
Quote:Even is a = 5, it will still test the b = 1 expression?
Yes, and there is a BIG difference. Try just one A OR B: it's twice as fast when the OR isn't there.
Quote:Quote:Even is a = 5, it will still test the b = 1 expression?
Yes, and there is a BIG difference. Try just one A OR B: it's twice as fast when the OR isn't there.
That really sucks that QB doesn't even try to optimize at all.
However, you could only get around it with AND.
It is very frustrating to learn every now and then that QB's compiler doesnt optimize anything =(
AND is also inefficient. It checks each truth value and doesn't exit out once a FALSE is reached.
=O were m$ developers brain dead or something while developing QB?