[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Subroutine arguments not right yet
- From: "Aaron Brown" <arundelo@...>
- Date: Thu, 6 Sep 2007 10:56:11 -0400
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 --------------------------------")
assert(loadfile("C:\\lua\\source\\dummy2.lua"))
loadfile just creates a function; the above never calls it.
(Calls 1 and 3 are fine.)
--
Aaron
http://arundelo.com/