Runtime evaluation/In an environment: Difference between revisions

Added FreeBASIC
(Omit Insitux)
(Added FreeBASIC)
 
(3 intermediate revisions by 2 users not shown)
Line 224:
 
=={{header|Elena}}==
ELENA 56.0x:
 
Using VM console client:
Line 235:
var arg := program_arguments[2];
var program := lscript.interpretinterpretLine(text);
console.printLine(
text,",",arg," = ",program.eval(arg.toReal()));
Line 328:
LOOP
; ok</syntaxhighlight>
 
=={{header|FreeBASIC}}==
<syntaxhighlight lang="vbnet">#include "solver.bi"
 
Dim As String expression = "(x ^ 2 )-7"
 
setVar("x",1.2)
Print "one = ";Solver(expression)
setVar("x",3.4)
Print "two = ";Solver(expression)
 
Sleep</syntaxhighlight>
{{out}}
<pre>one = -5.560000000000001
two = 4.559999999999999</pre>
 
=={{header|Genyris}}==
Line 1,501 ⟶ 1,516:
 
=={{header|Wren}}==
Wren has ana undocumentedlibrary method called ''Meta.eval'' which can do runtime evaluation.
 
However, it only appears to work with module level variables.
<syntaxhighlight lang="ecmascriptwren">import "meta" for Meta
 
var x
2,136

edits