Difference between revisions of "Repeat Command"
From GeoGebra Manual
m |
(command syntax: changed [ ] into ( )) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} | ||
− | ;Repeat | + | ;Repeat( <Number>, <Scripting Command>, <Scripting Command>, ... ) |
:Repeats the execution of scripting commands ''n'' times, where ''n'' is the given ''Number''. | :Repeats the execution of scripting commands ''n'' times, where ''n'' is the given ''Number''. | ||
:{{Example|1=<br/> | :{{Example|1=<br/> | ||
− | ::<code>Turtle | + | ::<code>Turtle()</code>.<br/> |
::Click the [[File:Animate_Play.png|link=]] "Play" button displayed at bottom left.<br/> | ::Click the [[File:Animate_Play.png|link=]] "Play" button displayed at bottom left.<br/> | ||
− | ::<code> Repeat | + | ::<code> Repeat(8, TurtleForward(turtle1, 1), TurtleRight(turtle1, 45°))</code><br/> |
::The turtle moves and draws a regular octagon. | ::The turtle moves and draws a regular octagon. | ||
}} | }} |
Latest revision as of 09:06, 12 October 2017
- Repeat( <Number>, <Scripting Command>, <Scripting Command>, ... )
- Repeats the execution of scripting commands n times, where n is the given Number.
- Example:
Turtle()
.- Click the "Play" button displayed at bottom left.
Repeat(8, TurtleForward(turtle1, 1), TurtleRight(turtle1, 45°))
- The turtle moves and draws a regular octagon.