Repeat syntax addition

Paul Dupuis paul at researchware.com
Sun Apr 5 13:18:49 EDT 2015


On 4/5/2015 12:54 PM, Peter Haworth wrote:
> Wouldn't it be nice if you could:
>
> repeat for each line rLine in tLines where rLine begins with "xyz"
> .
> end repeat
>
> I know it's trivial to test the condition within the repeat loop but having
> "where" <condition>" seems more elegant somehow.

Why not:

filter lines of tLines with "xyz*"
repeat for each line rLine in tLines
.
end repeat

The suggested  - where rLine begins with "xyz" - clause is 5 words. The
- filter lines of tLines with "xyz*" - is also just 5 words

Extending LiveCode's to do something you can already do in the language
easier makes most sense if it save the developer significant keystrokes.





More information about the use-livecode mailing list