lua-users home
lua-l archive

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

Jeff Wise wrote:

The "dummy2" is a "hello, world" program which also prints
the two arguments that were passed to it.

The arg table is created for scripts called from the command
line, so the arg table you're seeing is the one created for
the calling program's command-line arguments.  Try making
dummy2.lua look like this:

 print("dummy2.lua's arguments:", ...)

  print("Call # 2 --------------------------------")

loadfile just creates a function; the above never calls it.
(Calls 1 and 3 are fine.)