General information
Category:
Coding, syntax & commands
Jim,
You're not thick. Jim Booth was trying to say that AND and OR are equal and that the evaluation proceeds strictly from left to right in the absence of parentheses. My example shows that precedence is taken into account.
>SNIP
>
>Dave,
>
>Call me thick, but I don't see what you are getting at...
>
>I would expect the second to evaluate T, being evaluated from left to right because I see its alternate form as " .t. or (.t. and .F.) ". So I guess I would call it 'precedence' if one means that the "AND" word is *considered first* in relating the operands to operators, but I would still say that evaluation proceeds from left to right once those decisions have been made.
>
>What I am trying to say is that the operators seem to be evaluated/considered in the order as documented but the actual evaluation of the expression then proceeds from left to right. Both of your examples would support that, wouldn't they?
>
>Cheers,
>
>Jim N
>
>
>>
>>Jim,
>>Try this,
>>? (.t. or .t.) and .F.
>>? .t. or .t. and .F.
>>
>>AND has precedence over OR, the second expression returns .T.! The first expression forces left to right evaluation.
Previous
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