lua-users home
lua-l archive

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


>From lua-l@tecgraf.puc-rio.br  Sun Jul 30 04:28:51 2000
>From: David Jeske <jeske@chat.net>
>> 
>> I'll see if I can find out, but at 500000 iterations this is likely a
>> C stack overflow.
>
>I don't understand. It's just in a while-loop. While would it overflow
>the C-stack?

I haven't looked at the code. I assumed it was a recursive function instead
of a while-loop. Well, it's odd then that you get segfaults.

>> >Is it using next() order or numeric order?
>> 
>> next() order, but much faster than a a while-next loop.
>
>Hmm.. I don't know how useful that'll be given that you can't control
>the order of next() elements...

Then, why not use
	local t={a,b,c}
	for i=1 to getn(t) do
		-- do something with t[i]
	end

>Perhaps you could expose enough about
>the next() linking behavior of tables to give determinstic ordering.

How could we do that given that tables are implemented with hash and that
they're dynamic?
--lhf