Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AND and OR evaluations in conditional statements
Message
From
09/04/1999 01:47:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00206066
Message ID:
00206790
Views:
17
Here are the two combinations that fail your rule for this specific case:
a, b, c   a or b and c
T, F, F   T
T, T, F   T
The priority/precedence of logical operators is similar to the one applied to arithmetic operators, using the following equiv:

NOT - ^ -- Maximum priority
AND - *
OR - + -- Minimum priority

Vlad

>Yes they are evaluate from left to right as in;
>
>a=.T.
>b = .F.
>c = .T.
>
>?a or b and c && .T.
>
>a = .f.
>
>?a or b and c && .F.
>
>b = .t.
>?a or b and c && .T.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform