parser

parser()

Try it yourself:

See also:

parser(): create an expression environment

parser() creates a parser context for evaluating expressions and keeping assigned variables together. It is useful for a sequence of formulas that share definitions.

Stateful calculations

In a parser context, define a name once and reuse it in later expressions. This is more convenient than repeatedly supplying the same scope, but it also means assignments can affect later results.

Related tools

Use parse() for a single text expression, evaluate() to calculate it, and simplify() for symbolic cleanup. clone() helps preserve a value before changing a workflow.

Caveat

Keep contexts separate when calculations must be reproducible and avoid evaluating untrusted code-like text.

All functions