|
Logical disjunction, the 'or' operator.
Syntax
R = A | B
Inputs
- A
- Anything that can be converted to a boolean value.
- B
- Anything that can be converted to a boolean value.
Outputs
- R
- Numerical representation of true or false (1 or 0).
Examples
Two value
example:
a = true;
b = false;
R = a | b
R = 1
Matrix
example:
a = [true, false; false, true];
b = [false, false; true, true];
R = a | b
R = [Matrix] 2 x 2
1 0
1 1
Comments
The operator returns true if either argument is logically true, and false otherwise.