Runtime evaluation/In an environment: Difference between revisions

Added Oz solution.
m (Fixed lang tags.)
(Added Oz solution.)
Line 191:
Output:
<pre>6 6 6</pre>
 
=={{header|Oz}}==
<lang oz>declare
fun {EvalWithX Program A B}
{Compiler.evalExpression Program env('X':B) _}
-
{Compiler.evalExpression Program env('X':A) _}
end
in
{Show {EvalWithX "{Exp X}" 0.0 1.0}}</lang>
 
=={{header|Perl}}==
Anonymous user