>IF test = X .or. test = Y .or. test = Z could be IF INLIST(test,X,Y,Z) >or >IF LEN(ALLTRIM(test)) = 0 could be IF EMPTY(test) >>
x >= 1 and x <= 10 * is the same as between(x, 1, 10)Closing a table: You can void checking whether it is actually open, with the following short, but somewhat confusing, syntax:
use in select("MyTable")(On the other hand, you can often avoid closing tables explicitly alltogether, by using private data sessions. But that is not the only reason to use private datasessions.)
IF MyValue = .T. * is redundant. You can just use: IF MyValueExclusive OR: Visual FoxPro doesn't have an explicit XOR operator.
* You might use: (a and not b) or (not a and b) * But the following is much more compact and elegant: a # b * Watch out for operator precedence. Comparison operators have a lower order of precedence than logical operators.