Runtime evaluation: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(→Insitux: correction) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 434:
=={{header|Elena}}==
ELENA
Using ELENA Script engine:
<syntaxhighlight lang="elena">import extensions'scripting;
Line 440:
public program()
{
}</syntaxhighlight>
{{out}}
Line 2,053:
$ wren-cli
\\/"-
\_/ wren v0.
> 20 + 22
42
Line 2,065:
Secondly, Wren has the ''Meta.eval'' method which can be used from within a script to execute any valid Wren code (presented to it in string form) at runtime. The string could be constructed within the script, obtained from a file or input by the user. Here's a very simple example:
<syntaxhighlight lang="
var s = "for (i in 0..4) System.print(i)"
|