$eval function

$eval(expression)

The $eval function evaluates its expression argument as a symbolic expression and returns the expanded result. The use of this function is rarely required, because symbolic expressions are usually evaluated in a recursive fashion. Some special cases require an explicit re-evaluation, however, in particular if a symbolic expression is retrieved from an external source such as:

See Examples for some of these cases.

Parameters

All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.

expression
Symbolic expression that must be evaluated.

Examples

Here are some usage examples for this function:

<$eval(<$fread(<INSTALLDIR>\data.txt)>)>
Reads the contents of the <INSTALLDIR>\data.txt file, then evaluates the result (i.e., the file contents) as a symbolic expression.
<$eval(<#<WindowsFolder>\system.ini?section?key>)>
Reads an INI file value from the <WindowsFolder>\system.ini file, then evaluates the result (i.e., the key value) as a symbolic expression.
<$eval(<@<HKLM>\Software\Company\Product\Value>)>
Reads a registry value from HKEY_LOCAL_MACHINE\Software\Company|Product\Value, then evaluates the result (i.e., the registry value) as a symbolic expression.