The or operator is a Boolean operator which returns <value:true>
if any of the arguments is true, else returns <value:false>
.
Its token is named OR.
Truth Table[]
Inputs | Output | |
---|---|---|
A | B | |
T | T | T |
T | F | T |
F | T | T |
F | F | F |
FDS[]
Example[]
I did this as long as
Applejack
is
83
or
Spike
is
1
:
...
This loops the next part of code if the variable Applejack
is equal to 83
or the variable Spike
is equal to 1
.
This is equivalent to the following Java code:
while(Applejack==83|Spike==1) { ...
See Also[]
Phrases (list) | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|