Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AND and OR evaluations in conditional statements
Message
De
09/04/1999 01:47:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206066
Message ID:
00206790
Vues:
16
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform