if
Name | Type | Description | Optional |
---|---|---|---|
condition |
?0 |
a value to be interpreted as bool |
no |
input |
?1 |
a value to be routed to one of the outputs |
no |
Name | Type | Description | Optional |
---|---|---|---|
outputT |
?1 |
the output selected by a true condition |
yes |
outputF |
?1 |
the output selected by a false condition |
yes |
if reads its condition and input input ports, and outputs the input value to the output port selected by the condition. If the condition is true, the top output port (outputT) is selected, and otherwise the bottom output port (outputF) is selected.
It is strongly recommended that if always be paired with a matching fi node, and that the conditional branches that are controlled by the if / fi pair be placed in their own circuits, per the guidelines given in Dataflow in Coreograph (Conditionals).