Lingo Dictionary > A-C > and |
![]() ![]() ![]() |
and
Syntax
logicalExpression1
and
logicalExpression2
Description
Logical operator; determines whether both logicalExpression1
and logicalExpression2
are TRUE (1),
or whether either or both expressions are FALSE
(0).
The precedence level of this logical operator is 4.
Example
This statement determines whether both logical expressions are TRUE
and displays the result in the Message window:
put 1 < 2 and 2 < 3
The result is 1, which is the numerical equivalent of TRUE
.
Example
The first logical expression in this statement is TRUE
; and the second logical expression is FALSE
. Because both logical expressions are not TRUE
, the logical operator displays the result 0, which is the numerical equivalent of FALSE
.
put 1 < 2 and 2 < 1 -- 0
See also
![]() ![]() ![]() |