On Fri, Apr 14, 2017 at 12:29:34AM +, Jethro via Digitalmars-d-learn wrote:
> Is there a way to retain the ordering of an associative array? When
> the elements are added then looped over using a foreach, the order is
> different.
An AA is implemented as an unordered hash. So the insertion ord
On Friday, 14 April 2017 at 00:29:34 UTC, Jethro wrote:
Is there a way to retain the ordering of an associative array?
When the elements are added then looped over using a foreach,
the order is different.
Use a separate array to store the keys, order them all time when
you add a new one, etc.
Is there a way to retain the ordering of an associative array?
When the elements are added then looped over using a foreach, the
order is different.