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 56.0x:
Using ELENA Script engine:
<syntaxhighlight lang="elena">import extensions'scripting;
Line 440:
public program()
{
lscript.interpretinterpretLine("system'console.writeLine(""Hello World"")");
}</syntaxhighlight>
{{out}}
Line 2,053:
$ wren-cli
\\/"-
\_/ wren v0.34.0
> 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="ecmascriptwren">import "meta" for Meta
 
var s = "for (i in 0..4) System.print(i)"
9,476

edits