[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looping through an array with FOR EACH


On 15/1/26 8:46 pm, Gianluigi wrote:
Hi everyone,

I seem to remember reading somewhere (perhaps in an email from Benoit?) that if you loop through an array with For Each in Gambas, you can't be sure of the correct sequence.
Did I dream it, or is it true?

Thanks, regards,
Gianluigi

P.S. I did some research (2 hours), but I didn't find anything.


I am going to interpret your "correct sequence" as "expected sequence". It is true. However rare to encounter.

There is chance that after manipulating an array (in many ways) that the order in which For Each iterates is not the same as the last "order" as determined by the operations on the array.

However, it is more a "beware of" rather than a rule.

I believe that he was just making people aware of this, rather than trying to scare them.

b


Follow-Ups:
Re: Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>
References:
Looping through an array with FOR EACHGianluigi <gradobag@xxxxxxxxxxx>