Parser.pl - Macro-based fronted to the MathObjects system.
Formula("formula");
The main way to get a MathObject Formula object (an equation that depends on one or more variables).
Compute("formula"[, var=>value, ...]);
Compute the value of a formula and return a MathObject appropriate to its value. Set the object so that the correct answer will be shown exatly as in the given string rather than by its usual stringification. If the value is a Formula and any var=>value pairs are specified, then the formula will be evaluated using the given variable values. E.g.,
$x = Compute("x+3",x=>2)
will produce the equivalent of $x = Real(5).
The original parsed formula will be saved in the object's original_formula field, and can be obtained by
$x->{original_formula};
if needed later in the problem.
Context();
Context($name);
Context($context);
Set or get the current context. When a name is given, the context with that name is selected as the current context. When a context reference is provided, that context is set as the current one. In all three cases, the current context (after setting) is returned.