Quote:
Originally Posted by Stefan
Ah examples please, there are several ideas of eval which seem to be quite different (some refer to eval as something that solves "1 + 2" or so). Also there was never an eval() function in Graal so I need some examples where you need it.
|
I think they are thinking along the lines of PHP's eval, where the passed string parameter is parsed as script commands or so. Here is a PHP example:
PHP Code:
eval("$magicVariableName = \"SomeValue\"; thisFunction();");
Return values are also passed through eval in PHP:
PHP Code:
echo(eval("return \"foo\";"));
... would produce "foo".