Ah that explains it. The extents works but I seem to remember for each is considerably faster On 2 Sep 2020, 16:29 +0100, Brian Milby via use-livecode <use-livecode@lists.runrev.com>, wrote: > 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@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@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Looping though a numerically indexed array
David Bovill via use-livecode Thu, 10 Sep 2020 14:40:19 -0700
- Re: Layers in PBrowser Dr. Hawkins via use-livecode
- Re: Layers in PBrowser Sean Cole (Pi) via use-livecode
- Re: Layers in PBrowser Geoff Canyon via use-livecode
- Re: Layers in PBrowser Bob Sneidar via use-livecode
- Re: Layers in PBrows... Mike Kerner via use-livecode
- Re: Layers in PBrows... Geoff Canyon via use-livecode
- Re: Layers in PB... Bob Sneidar via use-livecode
- Re: Layers in PB... Mark Wieder via use-livecode
- Looping though a numerically indexed array David Bovill via use-livecode
- Re: Looping though a numerically inde... Brian Milby via use-livecode
- Re: Looping though a numerically ... David Bovill via use-livecode
- Re: Looping though a numerica... Dan Friedman via use-livecode
- RE: Looping though a numerically inde... Ralph DiMola via use-livecode
- Re: Looping though a numerically ... Bob Sneidar via use-livecode
- Re: Looping though a numerica... Bob Sneidar via use-livecode
- Possible : stack with tra... David Bovill via use-livecode
- Re: Possible : stack... Bob Sneidar via use-livecode
- Re: Possible : s... David Bovill via use-livecode
- Re: Looping though a numerically inde... Alex Tweedly via use-livecode