logical-expression: expression && expression expression and expression expression || expression expression or expression ! expression not expression
EDEN operates in 3-value logic
(true, false and @
).
Any non-zero
value means true; zero means false. In addition to the lazy operators
(as in C, left-to-right evaluation, the second operand is evaluated only
if necessary), eager operators - and, or, not - are also defined. Notice
that the truth tables for the lazy and the corresponding eager operators
are not identical.
@ && @ = @ | @ and @ = @ | @ || @ = @ | @ or @ = @ |
@ && F = @ | @ and F = @ | @ || F = @ | @ or F = @ |
@ && T = @ | @ and T = @ | @ || T = @ | @ or T = @ |
F && @ = F | F and @ = @ | F || @ = @ | F or @ = @ |
F && F = F | F and F = F | F || F = F | F or F = F |
F && T = F | F and T = F | F || T = T | F or T = T |
T && @ = @ | T and @ = @ | T || @ = T | T or @ = @ |
T && F = F | T and F = F | T || F = T | T or F = T |
T && T = T | T and T = T | T || T = T | T or T = T |
! @ = T | not @ = @ |
! F = T | not F = T |
! T = F | not T = F |
Truth Tables for operators: &&
,
and
, ||
, or
, !
,
not
.