Anonymous user
Runtime evaluation: Difference between revisions
→{{header|ooRexx}}: Add example for ooRexx
(→{{header|REXX}}: added the REXX language. -- ~~~~) |
(→{{header|ooRexx}}: Add example for ooRexx) |
||
Line 374:
typeof bar; // 'string'
</lang>
=={{header|ooRexx}}==
The ooRexx INTERPRET instruction allows execution of dynamically constructed code. Almost any well-formed code can be executed dynamically, including multiple instructions at a time. The instructions are executed in the local context where the interpret instruction executes, so full access to the current variable context is available. For example:
<lang ooRexx>
a = .array~of(1, 2, 3)
ins = "loop num over a; say num; end"
interpret ins
</lang>
Executes the LOOP instruction, displaying the contents of the array pointed to by variable A.
=={{header|Oz}}==
|