lua-users home
lua-l archive

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


> Sometimes, you want to be able to enumerate all the functions
> in a table for documentation purposes - OK that's lame.

So, is this what you want? :)

bogdan@bogdan-virtual:~/work/patch_deliver/lua-5.1.4.patched/src$ ./lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print(type(math))
rotable
> for k, v in pairs(math) do print(k, v) end
abs	lightfunction: 0x805fc00
acos	lightfunction: 0x8060460
asin	lightfunction: 0x8060420
atan2	lightfunction: 0x80603c0
atan	lightfunction: 0x8060380
ceil	lightfunction: 0x8060340
cosh	lightfunction: 0x8060300
cos	lightfunction: 0x80602c0
deg	lightfunction: 0x805fb80
exp	lightfunction: 0x8060280
floor	lightfunction: 0x805fe80
fmod	lightfunction: 0x8060220
mod	lightfunction: 0x8060220
frexp	lightfunction: 0x80601d0
ldexp	lightfunction: 0x8060170
log10	lightfunction: 0x8060130
log	lightfunction: 0x80600f0
max	lightfunction: 0x805fd80
min	lightfunction: 0x805fe00
modf	lightfunction: 0x8060090
pow	lightfunction: 0x8060030
rad	lightfunction: 0x805fb40
random	lightfunction: 0x805fec0
randomseed	lightfunction: 0x805fd50
sinh	lightfunction: 0x805fd10
sin	lightfunction: 0x805fcd0
sqrt	lightfunction: 0x805fc80
tanh	lightfunction: 0x805fc40
tan	lightfunction: 0x805fbc0
pi	3.1415926535898
huge	inf
>

I'll release the new patch later though. For now I'd like to try (very
hard) to make it possible to set a rotable as a metatable for a
regular table/a datatype.

Best,
Bogdan