Anonymous user
Runtime evaluation/In an environment: Difference between revisions
Runtime evaluation/In an environment (view source)
Revision as of 21:23, 13 August 2009
, 14 years ago→TI-89 BASIC: new example
(→TI-89 BASIC: new example) |
|||
Line 286:
}
eval_with_x {expr {2**$x}} 3 5 ;# ==> 24</lang>
=={{header|TI-89 BASIC}}==
evalx(prog, a, b)
Func
Local x,eresult1,eresult2
a→x
expr(prog)→eresult1
b→x
expr(prog)→eresult2
Return eresult2-eresult1
EndFunc
■ evalx("ℯ^x", 0., 1)
1.71828
There are no facilities for control over the environment; expr() evaluates in the same environment as the caller, including local variables. [Someone please verify this statement.] [[Category:TI-89 examples needing attention]]
{{omit from|Java}}
|