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?

They do, it's just they're not called "arg" but rather "...":

[lua:/tmp/lua-5.1-work1] cat i
s= loadstring "arg={...} ; print(arg,arg[1],arg[2],arg[3]) print(...)"
s(10,20,30)
[lua:/tmp/lua-5.1-work1] bin/lua -v i
Lua 5.1 (work1)  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
table: 0x80670d0        10      20      30
10      20      30

--lhf