Behavior of Null Values in Logical Expressions
| Visual FoxPro 9.0 SP2 |
| Behavior of Null Values in Logical Expressions |
| See Also |
|
Null values persist through logical expressions in most cases. The following table describes the behavior of null values in logical expressions.
| Logical expression | Result if x=TRUE | Result if x=FALSE | Result if x=.NULL. |
|---|---|---|---|
|
x AND .NULL. |
.NULL. |
FALSE |
.NULL. |
|
x OR .NULL. |
TRUE |
.NULL. |
.NULL. |
|
NOT x |
FALSE |
TRUE |
.NULL. |
When a conditional expression encounters a null value, the condition fails, because .NULL. is not true (.T.). For example, a FOR clause that evaluates to .NULL. is treated as false (.F.). Note that null values are treated as .NULL. until the entire expression is evaluated.
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08