WolframLang: True/False (boolean)
True
and False
are builtin Symbols to represent true and false.
3 > 2 (* True *)
Boolean Operators (Logic Operators)
And[x, y]
-
(short syntax:
x&&y
)Return
AndTrue
when all args areTrue
.x = True; y = True; x && y
Or[x, y]
-
(short syntax:
x||y
)Return
OrTrue
if any args isTrue
.x = True; y = False; x || y
Not[x]
-
(short syntax:
!x
)Return
NotTrue
if arg isFalse
, and vice versa.x = False; ! x