[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: table iteration problem
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 18 Oct 2011 08:09:05 +0200
On Tue, Oct 18, 2011 at 5:56 AM, Victor Young <email@example.com> wrote:
> just in the order of how I construct the table, how could I do? Thanks!
Short answer: such tables do not have a stable iteration order (it's
the usual semi-random hash table thing)
To get the order you want, one way is to keep a sub-table of the keys
in order, and use that for iteration.