Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
while [2020/04/28 12:06] argemiro |
while [2026/08/28 03:36] (current) hermann Sync from local documentation review |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== While ====== | + | ====== While ====== |
| ===== Description ===== | ===== Description ===== | ||
| - | Execute contained functors while the value passed to [[Set While Condition]] is true. | + | This container executes the functors it contains while its condition is true. The condition is checked once before the first execution, using the value supplied to Initial Condition, and afterwards using the value set by a [[Set While Condition]] functor placed inside it. Each execution is called a step. While a step runs, the container makes the current step available to its contents through the internal output port Step. |
| ===== Inputs ===== | ===== Inputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ | + | |
| - | | Initial Condition | [[Boolean Value Type]] | The initial expression value for the while Functor. | | + | ^ Name ^ Type ^ Description ^ |
| + | | Initial Condition | [[Boolean Value Type]] | Initial value of the condition that controls whether the loop runs. | | ||
| ===== Optional Inputs ===== | ===== Optional Inputs ===== | ||
| - | None. | + | ^ Name ^ Type ^ Description ^ Default Value ^ |
| + | | Sequence Input | [[None Type]] | Ensures that the functor connected to this port finishes executing before this container starts. | None | | ||
| ===== Outputs ===== | ===== Outputs ===== | ||
| - | None. | + | ^ Name ^ Type ^ Description ^ |
| + | | Sequence Output | [[None Type]] | Connect this port to another container's Sequence Input to make this container finish executing before that other container starts. | | ||
| ===== Internal Outputs ===== | ===== Internal Outputs ===== | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Step | [[Non Negative Integer Value Type]] | Current iteration. | | + | | Step | [[Non Negative Integer Value Type]] | Current iteration step. | |
| ===== Internal Inputs ===== | ===== Internal Inputs ===== | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Condition | [[Boolean Value Type]] | The current value of condition for the loop. | | + | | Condition | [[Boolean Value Type]] | Current value of the condition that keeps the loop running, after the first execution. | |
| ===== Group ===== | ===== Group ===== | ||
| Line 33: | Line 36: | ||
| ===== Notes ===== | ===== Notes ===== | ||
| - | The value used to control the loop can be passed to the Condition internal input port using a [[Set While Condition]]. This functor must be placed inside the While and it binds automatically the internal input port. | + | Beyond the first execution, this container has no condition port of its own. Place a [[Set While Condition]] functor inside it and connect its output to decide whether the loop keeps running. |
| - | The execution continues until the value passed to the [[Set While Condition]] become false. | + | When Initial Condition may be false, and a result produced by the contained functors is used outside the container, connect a matching junction (such as [[Map Junction]] or [[Value Junction]]) after the container, so a value still reaches the rest of the model when the content never executes. |
| - | ===== Internal Name ===== | + | ===== Internal Name ===== |
| While | While | ||
| + | |||