lua-users home
lua-l archive

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


On Fri, Jan 05, 2007 at 01:47:55PM +0800, chong tsong wrote:
> As we know, loadfile() read a lua file and build a function accordingly.
> 
> Can we give the function any parameters when invoking it?
> 
> for example:
> 
> -- chunk.lua
> print(arg[1])
> io.flush()

"arg" is a 5.0ism.  In 5.1, use "...":

 local a = ...;
 print(a);

or any of the other ways of accessing "...", eg. print(...).

-- 
Glenn Maynard