Creating Logical Expressions
| Visual FoxPro 9.0 SP2 |
| Creating Logical Expressions |
| See Also |
Logical expressions evaluate to either true or false, which are represented by the values .T. and .F. in Visual FoxPro. Compose logical expressions by combining logical operators with the following Visual FoxPro elements:
-
Logical type fields.
-
Functions that return logical values.
-
Variables and array elements that contain logical values.
-
Any expression that evaluates to a logical value.
Visual FoxPro evaluates logical expressions from left to right, and only for as long as necessary. In the following example, the AND operator is used to create a logical expression. If any of the values in the expression are false (.F.), the entire expression is false. When Visual FoxPro encounters the first logical false (.F.), it doesn't evaluate the rest of the expression.
Copy Code | |
|---|---|
.T. AND .T. AND .F. AND .T. AND .T. AND .T. | |
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