Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AND and OR evaluations in conditional statements
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
AND and OR evaluations in conditional statements
Divers
Thread ID:
00206066
Message ID:
00206066
Vues:
69
Does Foxpro exaluate all ANDs before any ORs in a conditional statement, or does it evaluate them in order?

How would VFP evaluate the following IF statement?

c1 = "1"
c2 = "X"
c3 = "X"

IF c1 = "1" or c2 = "2" and c3 = "3"

Would it evaluate the previous IF statement to be like the first or second IF statement below?

if (c1 = "1" or c2 = "2") and c3 = "3" && evaluates to .f.
if c1 = "1" or (c2 = "2" and c3 = "3") && evaluates to .t.

Thanks - Brenda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform