Removing items from an Array

Mars - at -.-
Fri Feb 17 02:00:36 PST 2012


Hello everybody.
Once again I have a little question, this time about removing 
items from an assoc array in a foreach.

Why does the following code:
http://pastebin.com/65P9WDNS
Result in this output:
http://pastebin.com/4FzEE1zi

It seems rather strange to me. I'd expect the foreach_reverse to 
go over the array from the end to the beginning, and when I 
remove stuff from it, it shouldn't be a problem. But apparently 
it is.

Mars


More information about the Digitalmars-d-learn mailing list