lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Luaer,

I'm trying to dynamically evaluate a string but got the following confuse.


> func=function() return "hello" end
> =func()
hello
> a=loadstring('func()')
> rval=a()
> =rval
nil

I was expecting rval=='hello'

please point out what's wrong in the code above. Thanks.

Xu