Language Elements and Reference:xpplrm

Operations using logical values Foundation

Logical data types inherently have only two logical values: true (.T.) and false (.F.). Operations which can be preformed using the two logical values include logical operations, comparisons and assignments. All the operators for logical values are listed in the following table:

Operators for logical values
Operator Description
. Delimiter for literal logical value
.NOT. ! Logical negation
.AND. Logical AND
.OR. Logical OR
== Comparison: equal
!= <> # Comparison: not equal
> Comparison: greater than
>= Comparison: greater than or equal
= Comparison: equal
<= Comparison: less than or equal
< Comparison: less than
= Assignment
:= Inline assignment

When comparing or sorting logical values .F. (false) is less than .T. (true). The value .F. is considered the "empty" logical value and the function Empty() returns .T. (true) if .F. is passed to it. There are very few functions for logical values. These are listed in the following table:

Functions for logical values
Function Description
Empty() Tests whether logical value is "empty" (equals .F.)
FieldPut() Assigns logical value to field variable
FieldGet() Reads logical value from field variable
Transform() Converts logical value to formatted character string
Type() Determines data type via macro operator
Valtype() Determines data type

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.