Script Function Reference

Function Reference >Script Function Reference >Function Manipulation>evalFunction

evalFunction

evalFunction will evaluate a function defined in the calculator.

evalFunction(fn, parameters...)

Parameters

fn 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 Value

evalFunction returns the value evaluated. The return type can be a number, list, or matrix table.

Additional Information

Using a value retrieved by using getFunction will be faster than using a string to identify a function when evaluating the same function multiple times.

Example

function example()
	fn = getFunction("dist")
	r = evalFunction(fn, 3, 4)
	outputString("r="..r.."\n")
end