Repeat Times/en: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
 
(Updating to match new version of source page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<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==
Inputs in this block:
#a number
==Example==
[[File:repeat_times_example.gif|alt=Repeat Times example gif|thumb]]
[[File:repeat_times_example.png|alt=Repeat Times example code|thumb]]
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]].


[[Category:Logic]]
[[Category:Logic]]
[[Category:Code Block]]
[[Category:Code Block]]

Latest revision as of 17:25, 14 August 2023

Other languages:
The Repeat Times Block

Repeats the procedure(s) a specified number of times.

Syntax

Inputs in this block:

  1. a number

Example

Repeat Times example gif

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.