Runtime evaluation: Difference between revisions

Content added Content deleted
m ({{out}})
(Frink)
Line 376: Line 376:
restore
restore
unused . \ same as first unused; restore, foo, and my-def no longer defined</lang>
unused . \ same as first unused; restore, foo, and my-def no longer defined</lang>

=={{header|Frink}}==
The <CODE>eval[]</CODE> function can be used to evaluate aribitrary Frink code in the current environment, or in a new context.
<lang frink>
eval["length = 1234 feet + 2 inches"]
</lang>

Frink has an extensive security manager which allows the eval statements to prevent unsecure operations such as reading or writing a file or URL, creating new functions or classes, altering systemwide flags, evaluate arbitrary Java code, and so on. If code needs to evaluate unsecure statments, you can use the intentionally frighteningly-named <CODE>unsafeEval[str]</CODE>.


=={{header|Go}}==
=={{header|Go}}==