Name

setvar — Evaluate an expression, save and return the value.

Syntax

setvar(name, expression)
              

The SETVAR function has the following arguments:

name

The name for the saved value.

expression

The expression to evaluate, save and return.

Description

This function will evaluate an expression and save the result under the given name. The result may be subsequently retrieved using the getvar function.

The value of the expression is returned.

Examples

Formula

Description

Result

setvar('a', 1+1)Calculate the expression and save the value in 'a'.