Repeat Times: Difference between revisions
(Created page with "<languages/> <translate> Category:Logic Category:Code Block </translate>") |
(duplicate file already uploaded) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:2--> | |||
<section begin="image"/>[[File:repeat_times.png|alt=The Repeat Times Block|thumb]]<section end="image"/><p id="tooltip">Repeats the procedure(s) a specified number of times.</p> | |||
==Syntax== <!--T:3--> | |||
<!--T:4--> | |||
Inputs in this block: | |||
#a number | |||
==Example== <!--T:5--> | |||
<!--T:6--> | |||
[[File:repeat_times_example.gif|alt=Repeat Times example gif|thumb]] | |||
[[File:yield_example.png|alt=Repeat Times example code|thumb]] | |||
<!--T:7--> | |||
In this model each agent leaves a [[Special:MyLanguage/Stamp|stamp]] of a color which is repeated 15 times before it moves to the next color and repeats. Note that without the use of the [[Special:MyLanguage/Yield|yield]] statement the instructions would be completed in one tick of the [[Special:MyLanguage/Clock|clock]]. | |||
<!--T:1--> | |||
[[Category:Logic]] | [[Category:Logic]] | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
</translate> | </translate> |
Latest revision as of 18:06, 16 August 2023
Repeats the procedure(s) a specified number of times.
Syntax
Inputs in this block:
- a number
Example
In this model each agent leaves a stamp of a color which is repeated 15 times before it moves to the next color and repeats. Note that without the use of the yield statement the instructions would be completed in one tick of the clock.