Difference between revisions of "Execute Command"

From GeoGebra Manual
Jump to: navigation, search
m (update)
Line 6: Line 6:
 
{{example|
 
{{example|
 
* <code><nowiki>Execute[{"A=(1,1)","B=(3,3)","C=Midpoint[A,B]"}]</nowiki></code> creates points ''A, B'' and their midpoint ''C''.
 
* <code><nowiki>Execute[{"A=(1,1)","B=(3,3)","C=Midpoint[A,B]"}]</nowiki></code> creates points ''A, B'' and their midpoint ''C''.
* <code><nowiki>Execute[Join[{"f_{1}=1","f_{2}=1"},Sequence["f_{"+(i+2)+"}=f_{"+(i+1)+"}+f_{"+i+"}",i,1,10]</nowiki></code> creates first 10 elements of [[w:Fibonaci sequenceFibonaci sequence]].}}
+
* <code><nowiki>Execute[Join[{"f_{1}=1","f_{2}=1"},Sequence["f_{"+(i+2)+"}=f_{"+(i+1)+"}+f_{"+i+"}",i,1,10]</nowiki></code> creates first 10 elements of [[w:Fibonaci sequence|Fibonaci sequence]].}}
  
 
;Execute[<List of strings>,<Parameter 0>,....,<Parameter 9>]
 
;Execute[<List of strings>,<Parameter 0>,....,<Parameter 9>]
 
:Replaces %0 for parameter 0, %1 for parameter 1 and so on. Up to 10 parameters can be specified. After the rplacement, resulting scripts are executed.
 
:Replaces %0 for parameter 0, %1 for parameter 1 and so on. Up to 10 parameters can be specified. After the rplacement, resulting scripts are executed.
 
{{example| 1=<code>Execute[{"Midpoint[%0,%1]"},A,B}]</code> creates midpoint of segment ''AB''.}}
 
{{example| 1=<code>Execute[{"Midpoint[%0,%1]"},A,B}]</code> creates midpoint of segment ''AB''.}}

Revision as of 19:01, 17 March 2011



Execute[<List of Texts>]
Executes list of commands entered as texts.
Example:
  • Execute[{"A=(1,1)","B=(3,3)","C=Midpoint[A,B]"}] creates points A, B and their midpoint C.
  • Execute[Join[{"f_{1}=1","f_{2}=1"},Sequence["f_{"+(i+2)+"}=f_{"+(i+1)+"}+f_{"+i+"}",i,1,10] creates first 10 elements of Fibonaci sequence.


Execute[<List of strings>,<Parameter 0>,....,<Parameter 9>]
Replaces %0 for parameter 0, %1 for parameter 1 and so on. Up to 10 parameters can be specified. After the rplacement, resulting scripts are executed.
Example: Execute[{"Midpoint[%0,%1]"},A,B}] creates midpoint of segment AB.
© 2024 International GeoGebra Institute