[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: A question about 'next'
- From: Enrico Colombini <erix@...>
- Date: Sat, 23 Feb 2008 16:04:40 +0100
I'm aware that, when using 'next', "The order in which the indices are
enumerated is not specified".
But my question is:
- Is that order always the same, given the following conditions?
t = {
a = { x=1, y=2 },
b = { x=3, y=4 }
}
for k,v in next, t do
-- don't change k (of course)
-- don't change v
-- may change v.x, v.y
-- may add new fields to v
end
Given those assumptions, is the order of traversal of t always the same
in different invocations of this loop (either b,a or a,b in this case)
or is this not guaranteed?
Enrico