Difference between revisions of "Repeat Command"

From GeoGebra Manual
Jump to: navigation, search
(Created page with "<noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|scripting}} ;Repeat[ <Number>, <Scripting Command>, <Scripting Command>, ... ] :executes the given number of ti...")
 
(command syntax: changed [ ] into ( ))
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=5.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}}
{{command|scripting}}
+
;Repeat( <Number>, <Scripting Command>, <Scripting Command>, ... )
;Repeat[ <Number>, <Scripting Command>, <Scripting Command>, ... ]
+
:Repeats the execution of scripting commands ''n'' times, where ''n'' is the given ''Number''.
:executes the given number of times the listed commands.
 
  
 
:{{Example|1=<br/>
 
:{{Example|1=<br/>
::<code>Turtle[]</code>.<br/>
+
::<code>Turtle()</code>.<br/>
::Click on "play" button at bottom.<br/>
+
::Click the [[File:Animate_Play.png|link=]] "Play" button displayed at bottom left.<br/>
::<code> Repeat[8, TurtleForward[turtle1, 1], TurtleRight[ turtle1, 45° ]]</code><br/>
+
::<code> Repeat(8, TurtleForward(turtle1, 1), TurtleRight(turtle1, 45°))</code><br/>
::turtle moves by drawing 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 Animate Play.png "Play" button displayed at bottom left.
Repeat(8, TurtleForward(turtle1, 1), TurtleRight(turtle1, 45°))
The turtle moves and draws a regular octagon.
© 2024 International GeoGebra Institute