| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-12-02 22:24:21 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-12-02 22:24:21 +0100 |
| commit | 0a32a8eeb98d5f3507edf5e303ae655f4b923c74 (patch) | |
| tree | 772d1793d7d1cdd323d598d144e1624699abcf36 /content/fate_v1/instructions/loops | |
| parent | 0d2736d22ced1f9bf566192f8604f869e0f5c6b9 (diff) | |
Updating the documentation to match changes in Fate.
Diffstat (limited to 'content/fate_v1/instructions/loops')
| -rw-r--r-- | content/fate_v1/instructions/loops/_index.md | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/content/fate_v1/instructions/loops/_index.md b/content/fate_v1/instructions/loops/_index.md index 5aa14ac..82acb28 100644 --- a/content/fate_v1/instructions/loops/_index.md +++ b/content/fate_v1/instructions/loops/_index.md @@ -6,24 +6,44 @@ Every loop body defines its hierarchy level, from the local variables' point of view. ### WHILE -{{< fatecode >}}(while [BOOL] [I0 = INSTRUCTION] ... [IM = INSTRUCTION]){{< /fatecode >}} +{{< fatecode >}}(while [BOOL] + [I0 = INSTRUCTION] + ... + [IM = INSTRUCTION] +){{< /fatecode >}} Executes `[I0]` ... `[IM]` if, and as long as, `[BOOL]` yields true. ### DO WHILE -{{< fatecode >}}(do_while [BOOL] [I0 = INSTRUCTION] ... [IM = INSTRUCTION]){{< /fatecode >}} +{{< fatecode >}}(do_while [BOOL] + [I0 = INSTRUCTION] + ... + [IM = INSTRUCTION] +){{< /fatecode >}} Executes `[I0]` ... `[IM]`, and does so again as long as, `[BOOL]` yields true. ### FOR -{{< fatecode >}}(for [PRE = INSTRUCTION] [BOOL] [POST = INSTRUCTION] [I0 = INSTRUCTION] ... [IM = INSTRUCTION]){{< /fatecode >}} +{{< fatecode >}}(for + [PRE = INSTRUCTION] + [BOOL] + [POST = INSTRUCTION] + + [I0 = INSTRUCTION] + ... + [IM = INSTRUCTION] +){{< /fatecode >}} Executes `[PRE]`, then, if and as long as `[BOOL]` yields true, executes `[I0]` ... `[IM]` followed by `[POST]`. ### FOR EACH -{{< fatecode >}}(foreach [COLLECTION] {String} [I0 = INSTRUCTION] ... [IM = INSTRUCTION]){{< /fatecode >}} +{{< fatecode >}}(foreach [COLLECTION] {String} + [I0 = INSTRUCTION] + ... + [IM = INSTRUCTION] +){{< /fatecode >}} Executes `[I0]` ... `[IM]` for each member of `[COLLECTION]`, in order. The current member is stored in a new local variable named `{String}`. |


