lua-users home
lua-l archive

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


On Wed, Dec 05, 2001 at 08:43:40AM -0600, John S. Miley wrote:
> function savetab(t)
> 	for i, v in t do
> 		if type(v) == "table" then
> 			savetab(v)
> 			return
> 		else
> 			print ("Savetab: "..i.."="..v)
> 		end
> 	end
> end

Get rid of the "return" statement, and everything works as it
should. After calling savetab recursively, you have not processed
everything in the outermost table yet.

- Christian