eval
Script
5.1 OC
any
string
script
Script to be executed
bool
dont_pass_errors
If true and the script causes an error, the function returns nil and does not cancel its parent script execution.
Executes a string as script.
var v1, v2, v3, v4, v5;
for(var i = 1; i <= 5; i++) eval( Format("v%d = %d", i, i * i) );
Sets the variables v1 to v5 with the squared values of 1 to 5. (The script snippets "v1 = 1", "v2 = 4" ... "v5 = 25" are created with Format and executed with "eval".)
PeterW2002-04