Conditional Statements Tutorial
You can combine the operators "Not", "And"
and "Or" in
the same boolean expression, using the parentheses "(" and
(True And False) Or (Not False) = True
|(True And False)
||(Not False) |
The priority of the "Not"
operator is higher than
the priority of "And" and "Or" operators.
Not True And False = False, because
The first operater to be
executed is the "Not" (Figure 6):
Not True =
Then we get the following boolean expression:
False And False =
we will executed the "And" operator before
the "Not" operator,
we would get WRONG answer (Figure
||True And False|
What will be printed on
the form after
executing the following code?
Dim Elvis As
Elvis = (Not False And True) And Not ((True And Not False) Or