Tile - Loop For – Ylands
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Ylands scripting navbox}}" to "{{Ylands editor navbox}}") |
Lou Montana (talk | contribs) m (Text replacement - "{{Ylands editor navbox}}" to "{{Navbox/Ylands}}") |
||
Line 11: | Line 11: | ||
---- | ---- | ||
{{Ylands | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}} | {{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}} | ||
[[Category: Instructions]] | [[Category: Instructions]] | ||
[[Category: Ylands 0.12]] | [[Category: Ylands 0.12]] |
Revision as of 05:07, 30 December 2020
- This loop will execute selected instruction sequence as long as a counter variable (I) is within the defined range.
- Value of current iteration is returned as I and can be used as local variable in instructions inside the loop.
- Loop also support negative increments, so it is possible to perform count down, e.g FROM 10 TO 1 BY -1
- FROM, TO is half-closed interval, it does not include TO value. I ∈ [FROM, TO).
- It is possible to use break instruction to jump out of the loop.
Notes
- See also: Break / Continue.