On Wednesday, June 06, 2012 16:04:14 Paul wrote: > I have and array string[string][string][string] that works great > for everything I need except that they (assoc. arrays) don't > maintain an order. I need to maintain the order of entry. > > Are there any work arounds that others have used? I saw some > tricks in the book for sorting a single dimensional assoc. array. > > Thanks to all!
If you want an ordered map, then use std.container.RedBlackTree. It's a little bit annoying to use as a map (you basically have to use it as a set of pairs/tuples which are ordered on their first member), but it's quite doable (and is what C++'s STL does internally with std::map). Chaining them like you seem to be trying to do though would probably get ugly though. - Jonathan M Davis
