lua-users home
lua-l archive

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


Try
table.foreach(_G, print)
-Martin

Kenneth Lo wrote:

I'm upgrading from 4.0 to 5.0beta. One thing I can't really sort out after reading the manual and the past mails is the globals. There is suppose to be somthing called _glob (manual section 3.2) though some mails refer it as _global or __global. Also there is a pseudo-index called LUA_GLOBALSINDEX and the registry LUA_REGISTRYINDEX. When I print them from interactive lua, they all return nil. Am I correct that these values can only be assessed via C function calls? What really are pseudo-indices? What are they designed for?