Yield/es: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 2: Line 2:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
<p id="tooltip">Works as a pause in the current stack of code for 1 tick.</p>
<section begin="image"/>[[File:yield.png|alt=The Yield Block|thumb]]<section end="image"/><p id="tooltip">Works as a pause in the current stack of code for 1 tick.</p>
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
==Example==
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:yield_example.gif|alt=Yield example gif|thumb]]
[[File:yield_example.png|alt=Yield example code|thumb]]
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Yield can be used to complete tasks sequentially. In this example, when ‘celebrate’ is pushed we see that after each yield block a new forward step is taken. This shows that the yield block pauses the current set of instructions for one tick of the StarLogo Nova [[Special:MyLanguage/Clock|clock]].
</div>
</div>


[[Category:Lógica]]
[[Category:Lógica]]
[[Category:Code Block]]
[[Category:Code Block]]

Revision as of 15:20, 14 August 2023

Other languages:
The Yield Block

Works as a pause in the current stack of code for 1 tick.

Example

Yield can be used to complete tasks sequentially. In this example, when ‘celebrate’ is pushed we see that after each yield block a new forward step is taken. This shows that the yield block pauses the current set of instructions for one tick of the StarLogo Nova clock.