I have a single-function module build with Visual Studio 2010 that
apparently loads but its function cannot be accessed because the entries
in package.loaded are nil. Below print(type(cb)) returns nil while all
other k's in package.loaded return table.
Obviously, I am doing something wrong?
Here is a link to the code for the module:
http://codepad.org/Yz7jCAHH
C:\Documents and Settings\e0058060\My
Documents\Software\Lua\lua-5.2.0-beta\lua52\Debug>lua
Lua 5.2.0 (beta) Copyright (C) 1994-2011 Lua.org, PUC-Rio
require("cb")
for k,v in pairs(package.loaded) do print(k,v) end
string table: 003588E8
debug table: 00358378
package table: 003569F8
_G table: 00354E80
io table: 00357868
os table: 00357528
table table: 00357578
math table: 00359780
cb table: 0035C9A8
coroutine table: 003571F8
bit32 table: 003591E0
for k,v in pairs(package.loaded.cb) do print(k,v) end
write function: 00381390
print(type(os))
table
print(type(cb))
nil
print(type(string))
table
Allan Pfalzgraf
EATON
4201 North 27 Street
Milwaukee, WI 53216
tel: 414 449-6872
fax: 414 449-6616
AllanPfalzgraf@eaton.com
www.Eaton.com <http://www.eaton.com/> <http://www.eaton.com/>