|
Eric Ries wrote:
I am curious if it would be worthwhile to implement a perl-style eval() for executing lua code. Lua's dostring() is very close, but eval() has the addedadvantage of automatically returning the last statement executed. So for instance eval( "10" ) is equivalent to dostring( "return 10" )
so why not add just this line to your code?: function eval(s) return dostring("return "..s) end Steve