crow/bool.crow
(source)
new
bool
() bare
Same as false
.
==
bool
(a
bool
, b
bool
) bare
Boolean equality.
<=>
comparison
(a
bool
, b
bool
) bare
Compares false
less than true
.
to
nat64
(a
bool
) bare
0
for false
, 1
for true
.
false
bool
() bare
False boolean value.
This can also be written as ()
.
true
bool
() bare
True boolean value.
not
bool
(a
bool
) bare
Changes true
to false
, and false
to true
.
&&
bool
(a
bool
, b
bool
) bare
If a
is false
, returns false
immediately and does not evaluate b
.
Else, returns b
.
||
bool
(a
bool
, b
bool
) bare
If a
is true
, returns true
immediately and does not evaluate b
.
Else, returns b
.
bool
builtin
Boolean type: either false
or true
.
Unlike in other programming languages, this isn't a numeric type.