Use this function to evaluate and convert the value of any special tag(s) to a string variable, when variable substitution is off. The function returns the converted special tag(s), but you can also include string literals. For example if the current waypoint has the code of "GCABCD" and smart name of "BigRed", then:
Vsub Status=off
$data = Eval("%smart")
# $data is now equal to "BigRed".
$data = eval("The code is %code")
# $data is now equal to "The code is GCABCD"
Using eval() with variable substition turned off, will also ensure you don't get a syntax error if the data contains " (double quotes). For example, if the cache name was - My "little cache"
Then the following code would cause a syntax error in the macro because of the extra double quotes when the special tag is resolved:
$data = "%name"
To make sure you don't get a syntax error when using special tags this way you would need to use the following code: