|
On 2/8/2013 1:37 PM, Ivo Beltchev
wrote:
The order isn't defined unless you use contiguous integer keys starting from 1 AND you use ipairs() to iterate. Relying on a deterministic order otherwise is asking for trouble. In reality, the order isn't going to change if the table doesn't change. But if you insert a key, the new order could be completely different. And I've also seen the order for the exact same set of simple keys be different depending on the order of insertion into a table -- but my first point stands, that it's UNDEFINED behavior, and shouldn't be relied on. Tim |