Looping though a numerically indexed array
brian at milby7.com
Wed Sep 2 11:28:08 EDT 2020
As long as the array is indexed starting at 1 with no gaps it should work by looping for each element. I just did a quick test to confirm. I built a 100 element array and it looped in order. I deleted 2 keys and then it didn’t. I then added those 2 missing keys back and it worked again.
Sent from my iPhone
> On Sep 2, 2020, at 10:55 AM, David Bovill via use-livecode <use-livecode at lists.runrev.com> wrote:
> I’m pretty sure there must be a way to efficiently loop through numerically indexed arrays
> Repeat for each key and repeat for each element does not seem to sort the keys in numeric order,. Of course I can get the keys and sort them before repeating - but is there a more efficient way?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode