common code patterns

Monte Goulding monte at appisle.net
Fri Aug 11 17:46:23 EDT 2017


> On 12 Aug 2017, at 1:37 am, Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> So, let me rephrase - what are the use-cases people can see for allowing (some variant of):
> 
>   repeat ... with counter tCounter starting from tStart

Hmm…. what about:

repeat for each line tLine in line 5 to -1 of tLines with counter tCounter starting from 5

BTW if we ever do this could the following be ordered if the array is a 1..N sequence… I’m not really sure if repeat for each element is ordered in any way currently.

repeat for each element tElement in tArray with counter tCounter

I guess we could have more explicit syntax here which might be more flexible too

repeat for each element tElement and key tKey in tArray ordered numeric ascending

Cheers

Monte





More information about the use-livecode mailing list