1 -- dump global environment
4 if v
== nil then return end
5 if type(v
)=="userdata" or type(v
)=="function" then return end
6 -- if type(v)=="userdata" or type(v)=="function" then write("\t-- ") end
8 if type(v
) == "string" then write(format("%q",v
))
9 elseif type(v
) == "table" then
10 if v
.__visited__
~= nil then
18 if r
~= "__visited__" then
19 if type(r
) == 'string' then
22 savevar(n
.."["..r
.."]",f
)
28 else write(tostring(v
)) end
33 print("\n-- global environment")
34 local n
,v
= nextvar(nil)