Node:Inclusive OR, Previous:Logical operators, Up:Logical operators



Inclusive OR

Note well! Shakespeare might have been disappointed that, whatever the value of a variable to_be, the result of

to_be || !to_be

(i.e. "To be, or not to be?") is always 1, or true. This is because one or the other of to_be or !to_be must always be true, and as long as one side of an OR || expression is true, the whole expression is true.