AND |
and makes a “logic and” between two logic values.
exp1 and exp2
|
Element |
Description |
Restrictions |
|
exp1 |
expression_logique. |
None. |
|
exp2 |
expression_logique. |
None. |
# Test : does I=1 and J=2 ?
If I = 1 and J = 2
Infbox "Both
conditions are met"
Endif
# Loop as long as integers I and J are non-null,
avoiding an infinite loop.
If I < 0 and J < 0
Infbox "I and J
are negative ! The loop will be infinite !"
Else
While I and J
I -= 1 : J -= 1
:# Decrement I and J
Wend
Endif
and gives 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 and exp2 |
|
FALSE |
FALSE |
FALSE (=0) |
When
a formula is entered containing an ‘and‘ in a process or a mask, for example, the keyword
recognition phase replaces this keyword with the equivalent character ‘& ‘;
thus you may write either:
exp1 and exp2
or exp1 & exp2
|
Error |
Description |
|
ERMODE (10) |
The arguments are not numerical. |
|
|