Runtime evaluation/In an environment: Difference between revisions

→‎{{header|ooRexx}}: Add example for ooRexx
m (→‎{{header|Go}}: library change)
(→‎{{header|ooRexx}}: Add example for ooRexx)
Line 379:
Output:
<pre>6 6 6</pre>
=={{header|ooRexx}}==
The ooRexx interpret instruction executes dynamically created ooRexx code in the current variable context.
<lang ooRexx>
say evalWithX("x**2", 2)
say evalWithX("x**2", 3.1415926)
 
::routine evalWithX
use arg expression, x
 
-- X now has the value of the second argument
interpret "return" expression
</lang>
Output:
<pre>
4
9.86960406
</pre>
 
=={{header|Oz}}==