Divooka Reference

Boolean Routines

5 nodes

On this page 5

And

Function

Logical AND (&&). Returns true only if both operands are true.

Signature
And(left: Truth, right: Truth) -> Truth
bool And(bool left, bool right)

Parameters

nametypedefaultdescription
leftTruth—
rightTruth—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Boolean Routines
Package
Standard Library

Choose

Function

Overload 1 of 2

Signature
Choose -> Text
    condition: Truth
    whenTrue: Text
    whenFalse: Text
string Choose(bool condition, string whenTrue, string whenFalse)

One of two texts, by a condition: the ternary operator (condition ? whenTrue : whenFalse).

Parameters

nametypedefaultdescription
conditionTruth—
whenTrueText—
whenFalseText—

Returns

resultText

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

Signature
Choose -> Number
    condition: Truth
    whenTrue: Number
    whenFalse: Number
double Choose(bool condition, double whenTrue, double whenFalse)

One of two numbers, by a condition: the ternary operator (condition ? whenTrue : whenFalse).

Parameters

nametypedefaultdescription
conditionTruth—
whenTrueNumber—
whenFalseNumber—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Boolean Routines
Package
Standard Library

Not

Function

Logical NOT (!). Inverts the boolean value.

Signature
Not(value: Truth) -> Truth
bool Not(bool value)

Parameters

nametypedefaultdescription
valueTruth—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Boolean Routines
Package
Standard Library

Or

Function

Logical OR (||). Returns true if at least one operand is true.

Signature
Or(left: Truth, right: Truth) -> Truth
bool Or(bool left, bool right)

Parameters

nametypedefaultdescription
leftTruth—
rightTruth—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Boolean Routines
Package
Standard Library

Xor

Function

Logical exclusive OR (XOR). Returns true if exactly one operand is true.

Signature
Xor(left: Truth, right: Truth) -> Truth
bool Xor(bool left, bool right)

Parameters

nametypedefaultdescription
leftTruth—
rightTruth—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Boolean Routines
Package
Standard Library