lua-users home
lua-l archive

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


local variable lives along with the "block" it belongs, whatever you assign to it.

2012/9/28 Dong Feng <middle.fengdong@gmail.com>
It is said, if you assign "nil" to a global variable, or to an item of a table, you make that variable/item non-existent completely.

And then it says, if you declare a local variable with value "nil", that local variable still shadows the global ones (if there is one), meaning a local variable (which its own should be an item of some table) exists after assigned "nil".

Why such conflict? What am I missing?

Thanks,
Dong



--
Best Regards!
Sincerely,
keli zhou