General information
Category:
Coding, syntax & commands
>Pardon my nose here Vlad, but does " But if "a" is .F., the "and" is evaluated, and this is done before "or". " make sense... after all, for "a" to be known to be false, it has to have already been evaluated.
So, my statement doesn't make sense (?). Probably it makes sense only in MY English. :) As I said in a previous message, the precedence of operators gives the way to group operands, not the sequence (in time) to evaluate operands. My statement wanted to say:
1. The "and" operation is evaluated only if "a" is .f.
2. If "a" is .f., the result of the "and" operation is evaluated before the result of the "or" (which will be the final result).
Does it make sense now?
>And don't forget that we know, because of a prior bug in FP/VFP with syntactical-error/type-mismatch in non-first expressions of compound logical expressions, that evaluation always proceeds left to right.
We know that from the help (See "Creating Logical Expressions"). This is true as long as all operations have the same priority. This rule cannot beat the normal precedence of operators. And the sequence of operation evaluation is not necessarily the same as the order of operands evaluation. The example in this thread proves it.
>The precedence involved here has to do with the operators and which operands will be attached to which - *not* to the actaul expressions themselves.
How come the operator's precedence doesn't have anything to do with the expressions themselves?
Vlad
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only