repeat . . . delimit by
dunbarx at aol.com
dunbarx at aol.com
Sun Sep 15 11:48:29 EDT 2013
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 <dochawk at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sun, Sep 15, 2013 11:15 am
Subject: Re: repeat . . . delimit by
On Sat, Sep 14, 2013 at 5:14 PM, Roger Eller <roger.e.eller at sealedair.com>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
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list