Boolean values represent truth or falsehood, hence the two possible values of this type are true
and false
. When used in arithmetic expressions, true
is equivalent to 1
and false
is equivalent to 0
.
Yewslip>
print 5 > 3
(true)
Yewslip>
print 7 < 5
(false)
Yewslip>
print 1 + true
2