-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdb.lua
More file actions
37 lines (32 loc) · 725 Bytes
/
db.lua
File metadata and controls
37 lines (32 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- Mark H Carolan
--
-- Stroople project
-- © 2010 Mark H Carolan, Gregory S Hooper
module(..., package.seeall)
local isSimulator = system.getInfo("environment") == "simulator" and true or false
local info = print
function print(...)
if isSimulator then
local params = {...}
local txt = ""
for i = 1, #params do
local v = params[i]
local t = type(v)
if t == "string" or t == "number" then
txt = txt .. v .. " "
elseif t == "boolean" then
v = v and "true " or "false "
txt = txt .. v
elseif t == "table" then
info("{")
for k, v in pairs(v) do
info(" ", k, v)
end
info("}")
else
txt = txt .. "[" .. t .. "] "
end
end
info(txt)
end
end