Jump to content

Runtime evaluation: Difference between revisions

Frink
m ({{out}})
(Frink)
Line 376:
restore
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}}==
494

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.