Bill Allombert on Mon, 05 Nov 2007 12:51:42 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
eval behaviour in CVS |
Hello PARI-dev, Only if you are using the CVS version: At the time my() and lexically-scoped local variables were implemented, eval behaviour changed: ? f(x)=eval(x) %1 = (x)->eval(x) ? g(x)=eval("x") %2 = (x)->eval("x") ? f(2) %3 = x ? g(2) %4 = x We decided to reinstate the old behavior in the name of backward compatibility. If you used the local(x=x) trick, this is no more useful. This involves a new prototype code that record the list of local variables at the time a function is compiled (eval here). This list can then be used at runtime to access lexically-scoped local variables by name. Cheers, Bill.