While/es: Difference between revisions
(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/> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<section begin="image"/>[[File:while.png|alt=The While Block|thumb]]<section end="image"/><p id="tooltip">Tests to see if the condition is true. If so, then executes the commands attached to the hook. Repeats these commands continually while the condition remains true.</p> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Syntax== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Inputs in this block: | |||
#a comparative statement block ([[Special:MyLanguage/Equals|=]] statements, [[Special:MyLanguage/Greater Than|>]] statements, [[Special:MyLanguage/Not|not]] statement, [[Special:MyLanguage/And|and]]/[[Special:MyLanguage/Or|or]] statements) | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Example== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
[[File:while_example.gif|alt=While example gif|thumb]] | |||
[[File:while_example.png|alt=While example code|thumb]] | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Above is a model of growing plants. These plants need rain to fall on them in order to get larger. The while loop controls the weather, dictating whether or not there is a thunderstorm. | |||
</div> | |||
[[Category:Lógica]] | [[Category:Lógica]] | ||
[[Category:Code Block]] | [[Category:Code Block]] |
Latest revision as of 19:18, 14 August 2023
Tests to see if the condition is true. If so, then executes the commands attached to the hook. Repeats these commands continually while the condition remains true.
Syntax
Inputs in this block:
Example
Above is a model of growing plants. These plants need rain to fall on them in order to get larger. The while loop controls the weather, dictating whether or not there is a thunderstorm.