evaluate directive

Directive Name

evaluate

Directive Type

unstructured

Synopsis

<sql evaluate variable> expression </sql>

Description

The evaluate directive evaluates a formula expression and stores the result in the named variable. It creates a new instance of that variable, so that a popval directive will discard the new value, and will restore the old one.

Examples

<p>tmp is now: %[=tmp%]</p>

<sql evaluate tmp>
	tmp * 3 + 1
</sql>

<p>tmp is now: %[=tmp%]</p>

<sql popval tmp/>

<p>tmp is %[=tmp%] again</p>

See Also

set directive
Set variable escape