Functions

value

Supported By

Syntax

[the] value of factor

value ( expression )

Factor and expression yield any string.

Example

put the value of myFormula into myResult

Description

The value function evaluates the string passed to it as an XION expression. The string is evaluated as if it were inserted inside parentheses in place of the value function call.

If the string does not form a single valid expression, the string itself is returned.

Script

The following example demonstrates the value function:

on demoValue
  put "3 + 4" into expression
  put expression -- yields "3 + 4"
  put the value of expression -- yields 7
end demoValue

Security

To evaluate arbitrary XION expressions with this function, OpenXION's security settings must allow the DO_AND_VALUE security key. If the required security key is denied, a script error will be triggered.

See Also

do