Difference between revisions of "ParseToFunction Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
{{command|scripting}}
 
{{command|scripting}}
;ParseToFunction[ <Function f>, <String> ]
+
;ParseToFunction[ <Function>, <String> ]
 
:Parses the string and stores the result to [[Functions|function]] ''f''. Function ''f'' must be defined and [[Free, Dependent and Auxiliary Objects|free]] before the command is used.
 
:Parses the string and stores the result to [[Functions|function]] ''f''. Function ''f'' must be defined and [[Free, Dependent and Auxiliary Objects|free]] before the command is used.
 
:{{example|1=<div> Define <code><nowiki> f(x) = 3x² + 2</nowiki></code> and <code><nowiki> text1 = "f(x) = 3x + 1"</nowiki></code>. </div> <code><nowiki> ParseToFunction[f(x), text1]</nowiki></code> returns ''f(x) = 3x + 1''.}}
 
:{{example|1=<div> Define <code><nowiki> f(x) = 3x² + 2</nowiki></code> and <code><nowiki> text1 = "f(x) = 3x + 1"</nowiki></code>. </div> <code><nowiki> ParseToFunction[f(x), text1]</nowiki></code> returns ''f(x) = 3x + 1''.}}

Revision as of 11:23, 12 April 2013



ParseToFunction[ <Function>, <String> ]
Parses the string and stores the result to function f. Function f must be defined and free before the command is used.
Example:
Define f(x) = 3x² + 2 and text1 = "f(x) = 3x + 1".
ParseToFunction[f(x), text1] returns f(x) = 3x + 1.
© 2024 International GeoGebra Institute