comparison Utility.lua @ 48:b3679847e292

Kind of useful. I've accidentally gotten a table as the key before.
author John@Yosemite-PC
date Wed, 21 Mar 2012 22:51:34 -0400
parents 8856fc38cd41
children 619e4b9c3cd9
comparison
equal deleted inserted replaced
47:8856fc38cd41 48:b3679847e292
45 if( type(v) == "string" ) then 45 if( type(v) == "string" ) then
46 print(depth .. i .. " - " .. v) 46 print(depth .. i .. " - " .. v)
47 elseif( type(v) == "number" ) then 47 elseif( type(v) == "number" ) then
48 print(depth .. i .. " - " .. tostring(v)) 48 print(depth .. i .. " - " .. tostring(v))
49 elseif( type(v) == "table" ) then 49 elseif( type(v) == "table" ) then
50 print(depth .. i .." - ") 50 --if v == table then return end
51 print(depth .. tostring(i) .." - ")
51 PrintTable(v,depth.." ") 52 PrintTable(v,depth.." ")
52 elseif( type(v) == "boolean" ) then 53 elseif( type(v) == "boolean" ) then
53 print(depth .. i .. " - " .. tostring(v)) 54 print(depth .. i .. " - " .. tostring(v))
54 elseif( type(v) == "function" ) then 55 elseif( type(v) == "function" ) then
55 print(depth .. "function " .. i .. "()") 56 print(depth .. "function " .. i .. "()")