OR |
or is used to define a “logic or” between two logic values.
exp1 or exp2
|
Element |
Description |
Restrictions |
|
exp1 |
expression_logique. |
None. |
|
exp2 |
expression_logique. |
None. |
# Test : is there I=1 or J=2 ?
If I = 1 or J = 2
Infbox "One of the two conditions is fulfilled"
Endif
# Loop as long as I is positive or J is positive
While I > 0 or J > 0
I -= 1 :# Decrement I
J -= 1 :# Decrement J
Wend
or is used to obtain a logic result (0->false, 1->true) dependent on two logic expressions having true (non null) or false (null) values, in accordance with the following truth table:
|
exp1 |
exp2 |
exp1 or exp2 |
|
FALSE |
FALSE |
FALSE (=0) |
When a formula is entered containing an 'or' in a mask or routine, for example, the keyword recognition phase replaces or with the character | (vertical bar) that is its equivalent; therefore you can write both:
· exp1 or exp2
· exp1 | exp2
|
Error |
Description |
|
ERMODE (10) |
The arguments are not numerical. |
|
|