Need to filter out items of list
Robert Brenstein
rjb at robelko.com
Tue Jun 3 12:59:36 EDT 2014
On 03.06.2014 at 9:35 Uhr -0500 Charles E Buchwald apparently 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
>
If you are deleting lines, you need to loop from the last line down
to the first, referring to line numbers. If the computer has enough
memory, it might be faster to copy lines to be kept into another
variable, like:
put fld "super large blob of text" into tFieldText
put empty into tFieldTextFiltered
repeat for each line tLine in tFieldText
if (item 9 of tLine is empty) OR (item 15 of tLine > 0) then next repeat
put tLine & cr after tFieldTextFiltered
end repeat
RObert
More information about the use-livecode
mailing list