Script Function ReferenceFunction Reference >Script Function Reference >Function Manipulation>evalFunctionevalFunctionevalFunction will evaluate a function defined in the calculator.
evalFunction(fn, parameters...)
Parametersfn is string with a calculator function name or a function table value retrieved by getFunction.parameters are any parameters required by the function as a number or as a number, list, or matrix table format. Return ValueevalFunction returns the value evaluated. The return type can be a number, list, or matrix table.Additional InformationUsing a value retrieved by using getFunction will be faster than using a string to identify a function when evaluating the same function multiple times.Examplefunction example() fn = getFunction("dist") r = evalFunction(fn, 3, 4) outputString("r="..r.."\n") end |