Multiple choice

Directions: Use the following expression. (Height > 20) AND (Tree$ = "Hickory") OR NOT (Tree$ = "Oak")

Which of the logical operators in this expression will be evaluated first?

  1. AND

  2. NOT

  3. OR

  4. The order of evaluation makes no difference

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

NOT has the highest precedence among logical operators. It's evaluated before AND, which is evaluated before OR. In this expression, NOT (Tree$ = "Oak") is computed first.