Comparison

util/ztact.lua @ 2958:49d6bf241653

util.ztact: Fixed global accesses.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 01 Apr 2010 19:28:23 +0500
parent 1523:841d61be198f
child 3540:bc139431830b
comparison
equal deleted inserted replaced
2957:805b067cd13e 2958:49d6bf241653
112 end 112 end
113 113
114 114
115 function tostring_r (d, indent, tab0) -- - - - - - - - - - - - - tostring_r 115 function tostring_r (d, indent, tab0) -- - - - - - - - - - - - - tostring_r
116 116
117 tab1 = tab0 or {} 117 local tab1 = tab0 or {}
118 local rep = string.rep (' ', indent or 0) 118 local rep = string.rep (' ', indent or 0)
119 if type (d) == 'table' then 119 if type (d) == 'table' then
120 for k,v in pairs (d) do 120 for k,v in pairs (d) do
121 if type (v) == 'table' then 121 if type (v) == 'table' then
122 append (tab1, rep, k, '\n') 122 append (tab1, rep, k, '\n')
208 print_queue (queue, ' '..element) 208 print_queue (queue, ' '..element)
209 end 209 end
210 210
211 211
212 local function test_queue () 212 local function test_queue ()
213 t = {} 213 local t = {}
214 enqueue (t, 1) 214 enqueue (t, 1)
215 enqueue (t, 2) 215 enqueue (t, 2)
216 enqueue (t, 3) 216 enqueue (t, 3)
217 enqueue (t, 4) 217 enqueue (t, 4)
218 enqueue (t, 5) 218 enqueue (t, 5)