Or
Jump to navigation
Jump to search
or
is a keyword for logical binary operator of disjunction (or) of boolean algebra. It evaluates two operands and returns true
when at least one of the operands is true
, else it returns false
.
Examples
print false or false // output : 0
print false or true // output : 1
print true or false // output : 1
print true or true // output : 1
a = false
b = true
c = false
print a or b // output : 1
print b or c // output : 1
print a or c // output : 0
minimum = 3
maximum = 7
A = 4
B = 9
print A > minimum or B < maximum // output : 1
print A < minimum or B < maximum // output : 0