Permalink
Browse files

Requested Changes

  • Loading branch information...
Wilma456 committed Sep 11, 2017
1 parent 5588ee7 commit de757fef13a548040f044a0b1c63386d3ac2cb01
Showing with 16 additions and 6 deletions.
  1. +16 −6 src/main/resources/assets/computercraft/lua/rom/programs/lua.lua
@@ -19,15 +19,25 @@ local tEnv = {
setmetatable( tEnv, { __index = _ENV } )
local function displayTable( tDisplay )
local tSeen = {}
local sShow = "{\n"
for k, v in pairs( tDisplay ) do
for k, v in ipairs( tDisplay ) do
sShow = sShow .. " "
if type( v ) == "number" or type( v ) == "boolean" then
sShow = sShow .. k .. " = " .. tostring( v ) .. ",\n"
elseif type( v ) == "string" then
sShow = sShow ..k .. ' = "' .. v .. '",\n'
if type( v ) == "string" then
sShow = sShow .. '"' .. v .. '",\n'
else
sShow = sShow .. k .. " = ".. type( v ) .. ",\n"
sShow = sShow .. tostring( v ) .. ",\n"
end
tSeen[k] = true
end
for k, v in pairs( tDisplay ) do
if not tSeen[k] then
sShow = sShow .. " "
if type( v ) == "string" then
sShow = sShow ..k .. ' = "' .. v .. '",\n'
else
sShow = sShow .. k .. " = ".. tostring( v ) .. ",\n"
end
end
end
sShow = sShow .. "}"

0 comments on commit de757fe

Please sign in to comment.