I think we all agree that it's best to use parentheses, but I suspect that the reason the question was asked in the first place was because someone was trying to maintain existing code that didn't contain parentheses and wasn't sure if it was working right, or needed to know how it was supposed to work in order to make changes.
Bonnie
>The best advice is to use parentheses, of course. This is 1000% safe and sure and atomic bomb proof! :) And costs almost nothing. Just a few more key strokes for the huge benefit of having zero possible bugs!
>
>NOT has the highest priority. AND is in the middle and OR is the last. This is the precedence of operators and not the order to evaluate the operands. So, "a or b and c" is in fact "a or (b and c)".
>
>That doesn't mean the operation between parentheses is evaluated first. a is evaluated first, followed by b and c. As many already said here, VFP will stop as soon as the final result is known. In this case, if a is .T., the (b and c) operation is never executed. This is good to know when the operands are function calls that have side effects (because they may be never executed). As a rule of thumb, do not use function calls in a logical operation, but use only variables.
>
>Vlad