Boolean Routines
5 nodes
On this page 5
And
FunctionLogical AND (&&). Returns true only if both operands are true.
And(left: Truth, right: Truth) -> Truth
bool And(bool left, bool right)
Parameters
| name | type | default | description |
|---|---|---|---|
| left | Truth | — | |
| right | Truth | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Boolean Routines
- Package
- Standard Library
Choose
FunctionOverload 1 of 2
Choose -> Text
condition: Truth
whenTrue: Text
whenFalse: Textstring Choose(bool condition, string whenTrue, string whenFalse)
One of two texts, by a condition: the ternary operator (condition ? whenTrue : whenFalse).
Parameters
| name | type | default | description |
|---|---|---|---|
| condition | Truth | — | |
| whenTrue | Text | — | |
| whenFalse | Text | — |
Returns
| result | Text |
Remarks
Typed overloads rather than the obsolete LogicRoutines.Choose(bool, object, object), which
answered object and so could not feed a typed pin. A choice made by DATA is what keeps a
procedural callback one chain where a Branch - which does not rejoin - would repeat every statement
after the choice once per arm.
Overload 2 of 2
Choose -> Number
condition: Truth
whenTrue: Number
whenFalse: Numberdouble Choose(bool condition, double whenTrue, double whenFalse)
One of two numbers, by a condition: the ternary operator (condition ? whenTrue : whenFalse).
Parameters
| name | type | default | description |
|---|---|---|---|
| condition | Truth | — | |
| whenTrue | Number | — | |
| whenFalse | Number | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Boolean Routines
- Package
- Standard Library
Not
FunctionLogical NOT (!). Inverts the boolean value.
Not(value: Truth) -> Truth
bool Not(bool value)
Parameters
| name | type | default | description |
|---|---|---|---|
| value | Truth | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Boolean Routines
- Package
- Standard Library
Or
FunctionLogical OR (||). Returns true if at least one operand is true.
Or(left: Truth, right: Truth) -> Truth
bool Or(bool left, bool right)
Parameters
| name | type | default | description |
|---|---|---|---|
| left | Truth | — | |
| right | Truth | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Boolean Routines
- Package
- Standard Library
Xor
FunctionLogical exclusive OR (XOR). Returns true if exactly one operand is true.
Xor(left: Truth, right: Truth) -> Truth
bool Xor(bool left, bool right)
Parameters
| name | type | default | description |
|---|---|---|---|
| left | Truth | — | |
| right | Truth | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Boolean Routines
- Package
- Standard Library