[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to specify parameters to a file chunk?
- From: Glenn Maynard <glenn@...>
- Date: Fri, 5 Jan 2007 01:08:41 -0500
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