Creating Logical Expressions

See Also

Logical expressions have one of two values — true or false. .T. and .F. are used to specify true and false in Visual FoxPro.

Compose logical expressions by combining logical operators with the following Visual FoxPro elements:

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.

.T. AND .T. AND .F. AND .T. AND .T. AND .T.