Runtime evaluation/In an environment: Difference between revisions
Content added Content deleted
m (→{{header|Go}}: library change) |
(→{{header|ooRexx}}: Add example for ooRexx) |
||
Line 379: | Line 379: | ||
Output: |
Output: |
||
<pre>6 6 6</pre> |
<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}}== |
=={{header|Oz}}== |