For Each is now ordered?

Some years ago, the docs noted that “A For…Each loop does not guarantee that it will loop through the values in the array in index order.” I remember discussion about it at that time, such as this one: https://forum.xojo.com/15095-for-each-order-fr-23798/

The current docs say “For…Each loops through the values in the array in index order”. This is great. I’ve avoided For Each over the years, when ordering was important, but now it seems that I can use it.

@Greg O’Lone - do you know if there was an actual change (and if so, what version this happened in) or was it a clarification of the docs?

For Each always iterated in index order, but we just never guaranteed it would stay that way in the future. Last year we realized that we haven’t changed that behavior since For Each was added (2005 or so?) and that we did not plan to change it, so we clarified the docs on that point (this was May 2019).

Awesome, good to know.