Functions Index :: O :: Or

[<< up one level]


bool :: core


Or(val x1, val "x2", val "x3", val "x4", ... , val "x20")


Returns the result of the OR of its arguments. [1]

Possible usage includes combination of multiple tests in Assert() statements, combination of bitwise flags in one value, etc.


b1 = Or(true, true, false, false) # b1 == true

b2 = Or(1 == 0, 2 < 1, 3 == Factorial(2)) # b2 == false

b3 = Or(b1, b1 == b2, false) # b3 == true


[<< top]


[1]: The function can handle up to 20 arguments. This number is chosen as a good balance between usability and speed. If more arguments are needed use an array and the ArraySum function, or a suitable function of the array package.