Need to filter out items of list
dsc at swcp.com
Tue Jun 3 15:01:32 EDT 2014
Yes. I’m into short cryptic responses today.
The loop shouldn’t be repaired with ‘repeat i = 1 to the number of lines of…; because that is slow for large files, not only in selecting lines but in deleting them. Use ‘for each L’ and ‘put L after…’.
I think some changes in LiveCode make the loop variables not exactly constant, but a good style would be to treat them that way. They are not chunk references. Unless I missed something.
On Jun 3, 2014, at 12:41 PM, Klaus major-k <klaus at major-k.de> wrote:
> Hi all,
> Am 03.06.2014 um 20:36 schrieb Dar Scott <dsc at swcp.com>:
>> I recommend building a new string rather than deleting lines.
> and that is even mandatory, because "repeat for each xxx" is "read-only"! :-)
>> On Jun 3, 2014, at 8:35 AM, Charles E Buchwald <charles at buchwald.ca> wrote:
>>> Good Morning Skip,
>>> How about:
>>> put fld "super large blob of text" into tFieldText
>>> repeat for each line n in tFieldText
>>> if item 9 of n is empty OR item 15 of n > 0 then delete n
>>> end repeat
>>> ... not tested. But it seems like maybe you have something else in mind?
>>> - Charles
>>> On 03 Jun 2014, at 9:02 AM, Magicgate Software - Skip Kimpel <skip at magicgate.com> wrote:
>>>> Good morning coders,
>>>> I have a very, very large field that contains some text from a tab
>>>> delimited dataset. Row 1 contains the headers. Here is my dilemma... I
>>>> need to filter out lines where item 9=EMPTY or item 15 is greater than 0.
>>>> Any help or guidance?
>>>> Thank you!
> Klaus Major
> klaus at major-k.de
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode