lua-users home
lua-l archive

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



Is there a reason why 'loadstring' and 'loadfile' blocks won't take parameters?

> print(_VERSION)
Lua 5.1 (work)
> s= loadstring "print(arg,arg[i])"
> s(1,2,3)
[string "print(arg,arg[i])"]:1: attempt to index global `arg' (a nil value)
stack traceback:
        [string "print(arg,arg[i])"]:1: in function `s'
        stdin:1: in main chunk
        [C]: ?