lua-users home
lua-l archive

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


On Thu, Feb 3, 2011 at 8:30 PM, Steve Litt <slitt@troubleshooters.com> wrote:
> I understand everything except the magical working of argument str. How does
> the oldprint(str) between the lines of equal know that the str arg in the
> function declaration refers to the argument of the original print()? Looks
> like magic to me, and I'm going to have to explain it.

The variable is defined implicitly when the argument is passed to the
function. No "str=self.str" required. ;)

Chris
--
51st century guy