If you are not planning to change anything in the data itself, then you can use 
the repeat for each line theLine of theData form in your inner loop. 

But I do not see the advantage of doing it in blocks of 50, unless there is 
something about the data that requires it. 

Bob


On Jun 7, 2011, at 6:05 AM, Matthias Rebbe wrote:

> Hi,
> 
> i have a variable which contains data with unspecified number of lines. It 
> can be 3 but it can also be 9000 or whatever.
> 
> I need to do some calculations with each line of that data, but want to do it 
> in steps of e.g. 50 lines.
> 
> I thought i would do that with 2 repeat loops ( one within the other). 
> 
> Something like this
> 
> 
> repeat with i = 1 to the number of lines of DATA step 50
> 
>      repeat with k = 0 to 49
>           do what ever with line (i+k) of DATA
>     end repeat
> 
> end repeat
> 
> 
> I could access  each line then in the repeat loop with line (i+k), but how do 
> i take care if the number of lines are not a multiple of 50?
> 
> Is my solution the right one or is there a better way?
> 
> Regards,
> 
> Matthias
> 
> 
> 
> _______________________________________________
> 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

Reply via email to