common code patterns

Mark Waddingham mark at livecode.com
Fri Aug 11 11:37:41 EDT 2017


On 2017-08-11 17:26, Mark Wieder via use-livecode wrote:
> On 08/11/2017 02:24 AM, Mark Waddingham via use-livecode wrote:
> 
>> Not quite on topic for the thread, but this interested in me in terms 
>> of - what are the use cases?
> 
> Somewhat similar to Ralph's use cases, this paradigm comes up quite
> often in my code. Probably the most common case is where I want the
> performance of a 'repeat for each' loop but don't have a proper
> iterator to use, so I have to use a doppelganger. Examples here from
> actual working code:

Hehe - I wasn't clear enough there... I meant 'use-cases for a 
generalized form allowing start index to be specified'.

Although, Ralph's suggestion of allowing a counter alongside *any* 
repeat perhaps suggests the generalization *might* be worthwhile (after 
all there isn't a thing you are counting from 1 there - unlike in repeat 
for each).

So, let me rephrase - what are the use-cases people can see for allowing 
(some variant of):

    repeat ... with counter tCounter starting from tStart

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list