or* ( obj1 obj2 -- obj2/obj1 )


Vocabulary
kernel

Inputs
obj1a generalized boolean
obj2a generalized boolean


Outputs
obj2/obj1a generalized boolean


Word description
If both inputs are false, outputs f. Otherwise outputs the first of obj2 and obj1 which is true.

Notes
This word implements boolean inclusive or, so applying it to integers will not yield useful results (all integers have a true value). Bitwise inclusive or is the bitor word.

Examples
Usually only the boolean value of the result is used, however you can also explicitly rely on the behavior that the result will be the last true input:
USING: kernel prettyprint ; t f or* .
t

USING: kernel prettyprint ; "hi" 12.0 or* .
12.0


See also
or, or?

Definition

: or* ( obj1 obj2 -- obj2/obj1 ) swap or ; inline