lua-users home
lua-l archive

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

> Would we then still be able to access arg[0] or even arg[-1] ??


> argv:
>    in C/C++/C#/Java/Erlang, the 'commandline argument vector' is
> usually passed to the main function.
>    in Perl, argv is declared as '@ARGV' (note that it's uppercase)
>    in Ruby, argv is declared as a constant symbol named ARGV (again,
> uppercase)
>    in python, argv is available through the 'sys' module, which has to
> be imported manually


(If it has to be changed ... :))
What about renaming *arg* into *_ARG* in the interpreter?

Or to access *arg* with *...*, but if you want to access *arg[0]*, you could access it with *debug.arg[0]*?