Difference between revisions of "math.eval"
Jump to navigation
Jump to search
Jimbauwens (talk | contribs) |
|||
Line 15: | Line 15: | ||
== Example == | == Example == | ||
− | <source lang="lua">math.eval("sqrt( | + | <source lang="lua">math.eval("sqrt(16)") -- returns 4</source> |
<br> | <br> | ||
== See also == | == See also == |
Revision as of 12:09, 6 June 2012
math.eval is a math library extension.
The function calls the math server with the specified arguments and returns the a numerical result if possible.
Syntax
math.eval(expression)
evaluates "expression" (can contain Basic arguments) and returns a result as a number if possible.
Expression can contain everything a TI-Basic function can contain. You can seperate statements using ":".
It can also contain calls to user defined functions in the document, or functions in global libraries.
Example
math.eval("sqrt(16)") -- returns 4