Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AND and OR evaluations in conditional statements
Message
From
09/04/1999 21:18:53
 
 
To
09/04/1999 20:52:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00206066
Message ID:
00207127
Views:
13
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
Next
Reply
Map
View

Click here to load this message in the networking platform