Condition
Branches on a comparison of A and B, or on a logic gate over the two.
- Category
- Control
- Topics
- Scheduler
Ports
- triggercontrol
- Astring
- Bstring
- onTruecontrol
- onFalsecontrol
- Resultbool
Data types
string
number
bool
Strings accept any data input.
Numbers accept boolean input.
Fields
| Field | What it does | Default | Limits |
|---|---|---|---|
| Operator | Chooses a comparison of A and B, or a logic gate over them. | == |
|
| A | The first operand; a wired A replaces it. | None | None |
| B | The second operand; a wired B replaces it. | None | None |
| is true | For a gate, reads A as it is when checked and flipped when unchecked. | On | Shown only for the gate operators. |
| is true | For a gate, reads B as it is when checked and flipped when unchecked. | On | Shown only for the gate operators. |
What a run does
Decides one outcome from A and B, then leaves by onTrue or
onFalse.
Neither port is an error.
A wired A or B replaces
its field.
Result carries the outcome as 1 for true and 0 for false, so
it can feed another Condition.
| Operator | True when |
|---|---|
== |
A equals B. |
!= |
A does not equal B. |
> |
A is greater than B. |
< |
A is less than B. |
contains |
The text of A contains the text of B, and case matters. |
Two numbers are compared as numbers, so 9 is less than
10.
A number is a wired number, or text that reads as one, such as
10.
Anything else is compared as text, and case matters.
== and != compare as booleans when either side is the text
true or false.
The other side must read as a boolean
too.
A boolean, a number, or the text true or
false does.
A number is true unless it is 0.
A wired true
arrives as 1, so it equals the text true.
The gate operators AND, OR, XOR,
NAND and NOR do not compare.
They read A and B as
true or false, then combine the two.
A value is true when it is the boolean true or a number other than 0.
The text
true in any capitals is true, and so is text that reads as a number
other than 0.
Everything else is false, including empty text, text such as
yes, and a value that was not set.
Each operand has an is true box, shown only for a gate operator.
Checked,
which is the default, the operand is used as it is.
Unchecked, the operand is
flipped: true becomes false and false becomes true.
So AND with
the box under A unchecked is true when A is false and B is true.
The gates combine A and B as their boxes leave them.
| A | B | AND | OR | XOR | NAND | NOR |
|---|---|---|---|---|---|---|
| False | False | False | False | False | True | True |
| False | True | False | True | True | True | False |
| True | False | False | True | True | True | False |
| True | True | True | True | False | False | False |