The repeat index variable is evaluated and loaded once, when the script is 
compiled. It does not matter how that single value is attained.


Entirely different from, say using a custom function to sort:


sort lines by char customFunction() of each


Craig Newman



-----Original Message-----
From: Dr. Hawkins <[email protected]>
To: How to use LiveCode <[email protected]>
Sent: Sun, Sep 15, 2013 11:15 am
Subject: Re: repeat . . . delimit by


On Sat, Sep 14, 2013 at 5:14 PM, Roger Eller <[email protected]>wrote:

> Would using a function do the trick?
>
> repeat for each item theDat in delimitBy(theData,vtab)
> do something
> end repeat
>
> function delimitBy pData,pDel
>     set the itemDel to pDel
>     return pData -- unaltered data
> end delimitB
>

Not if the repeat works the way I think it does . . .  I don't think that
the function would get called on each iteration.

What got me thinking was when I discovered that changing the itemDel to tab
inside my loop would cause the repeat to continue parsing with tab, not
vtabl


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to