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
)
ReturnTrue
when all args areTrue
. Andx = True; y = True; x && y
Or[x, y]
-
(short syntax:
x||y
)
ReturnTrue
if any args isTrue
. Orx = True; y = False; x || y
Not[x]
-
(short syntax:
!x
)
ReturnTrue
if arg isFalse
, and vice versa. Notx = False; ! x