Cond
Name |
Mandatory |
Description |
Default |
Type |
⬅️ Input |
|
The value that will be passed to each predicate and action to execute. |
|
Any |
Output ➡️ |
|
The input of the shard if Passthrough is true ; otherwise, the output of the action of the first matching condition. |
|
Any |
Wires |
No |
A sequence of shards, interleaving condition test predicate and action to execute if the condition matches. |
none |
[Shard [Shard] None] |
Passthrough |
No |
The output of this shard will be its input. |
true |
Bool |
Threading |
No |
Will not short circuit after the first true test expression. The threaded value gets used in only the action and not the test part of the clause. |
false |
Bool |
Takes a sequence of conditions and predicates. Evaluates each condition one by one and if one matches, executes the associated action.
Examples
| 0.5 | Cond([
{IsMore(0.7)} {"fast"}
{IsLess(0.3)} {"slow"}
; last case acts as default
{true} {"normal"}
] Passthrough: false) | Assert.Is("normal" Break: true)
|