General information
Category:
Coding, syntax & commands
Title:
AND and OR evaluations in conditional statements
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
Next
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