Val(
string:varname,
[bool:deref]
)
→ var
Returns the value of a variable; varname is provided as a quoted string. This is useful for variables which contain characters that would confuse the Evaluator's parser (e.g. if the name begins with a number, or contains a colon).
Example:
flag = Val("35mmfocallength"); // get value of the 35mmfocallength field
If the deref parameter is set to true, it causes the named variable to be dereferenced. That is, the named variable should hold a string which is the name of another variable, and the function will return the value of that second variable. For example,
a = "b"; b = "c"; Output(Val(a)); // -> "b" Output(Val(a, true)); // -> "c"