lua-users home
lua-l archive

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


Oh, yeah. Sorry about that!  I've only been playing with the language for days, so I missed a
subtle point: 'x = nil' does not affect the table x refers to, it merely reduces the number of
references to that table (by one).

Thanks,
Eric

--- Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> >function Matrix:delete()
> >   self = nil
> >end
> 
> despite the appeareances, this does not set the value of the caller object to
> nil: it only sets the value of the local variable 'self' to nil.
> this variable is an ordinary local variable (except that it's implicit),
> which is initialized to the value of the caller object.
> --lhf


__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/