lua-users home
lua-l archive

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

On Mon, Nov 10, 2008 at 08:39:51AM -0800, Sam Roberts wrote:
> On Mon, Nov 10, 2008 at 7:58 AM, Geoff Richards <> wrote:
> > Hi,
> >
> > I've just realised that I'm using the old 'arg' global in a script rather
> > than the new vararg syntax, but I don't know an equivalent way to get the
> > value for arg[0].  I was using it to figure out a file's name based on
> arg is no longer used for varargs, but it does continue to be used as
> the table the lua executable places the argv into.
> So, your code is good.

You're quite right, my code still works with the legacy 'arg' feature
disabled, I was being misled by the fact that it isn't created when
running code entered interactively, which makes sense of course.