Or

From MiniScript Wiki
Revision as of 19:19, 29 January 2025 by FR-b0n5a1 (talk | contribs) (Created page with "<c>or</c> is a keyword for logical binary operator of disjunction (or) of [https://en.wikipedia.org/wiki/Boolean_algebra boolean algebra]. It evaluates...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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