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:
- A registry value, using the <@...regpath...> syntax
- An INI file value, using the <#path?section?key> syntax
- An external file, using the <$fread(...filepath...)> syntax
See Examples for some of these cases.
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
- Symbolic expression that must be evaluated.
Here are some usage examples for this function:
- Reads the contents of the <INSTALLDIR>\data.txt file, then evaluates the result (i.e., the file contents) as a symbolic expression.
- Reads an INI file value from the <WindowsFolder>\system.ini file, then evaluates the result (i.e., the key value) as a symbolic expression.
- 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.