Sat, 21 Sep 2013 14:31:22 +0100
Fix math.frexp() and add more tests (thanks Florob, Link Mauve, xnyhps)
57 | 1 | -- globals.lua |
2 | -- show all global variables | |
3 | ||
4 | local seen={} | |
5 | ||
6 | function dump(t,i) | |
7 | seen[t]=true | |
8 | local s={} | |
9 | local n=0 | |
10 | for k in pairs(t) do | |
11 | n=n+1 s[n]=k | |
12 | end | |
13 | table.sort(s) | |
14 | for k,v in ipairs(s) do | |
15 | print(i,v) | |
16 | v=t[v] | |
17 | if type(v)=="table" and not seen[v] then | |
18 | dump(v,i.."\t") | |
19 | end | |
20 | end | |
21 | end | |
22 | ||
23 | dump(_G,"") | |
24 |