lua-users home
lua-l archive

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


> function dump_table(t, prefix, seen)
>       prefix = prefix or ""
>       seen = seen or {}
>       if seen[t] then
>           print(prefix .. " is recursive")
>       else
>          seen[t] = t
>           local k,v
>          for k,v in pairs(t) do
>                if(type(v) == "table") then
>                       dump_table(v, prefix .. k .. ":",seen)
>                 else
>                       print(prefix .. k .. "=" .. tostring(v))
>                 end
>           end
>       end
> end

Cool. What do I pass to this param 'seen'?