Talk:Runtime evaluation/In an environment: Difference between revisions

oops, didn't note changes made
(reply)
(oops, didn't note changes made)
Line 12:
 
x should not be global in the sense that the values given to it are visible to code ''other'' than the code being evaluated. In the Perl example, the variable is made local (lexical) by <code>my</code>; in the PHP example I (perhaps mistakenly) assumed that an undeclared variable is global. If that is wrong, please delete the flag on the PHP example. --[[User:Kevin Reid|Kevin Reid]] 02:01, 30 April 2009 (UTC)
 
Oh, I just saw your changes. The Octave example is now correct (and I like the variety of using a list/vector), but the Tcl example was better in the previous version -- the problem with it then was that the proc eval_twice should specifically bind the variable name x, not call a function with an arbitrary local variable name. --[[User:Kevin Reid|Kevin Reid]] 02:21, 30 April 2009 (UTC)