Strange results in deletion of lines

Alex Tweedly alex at tweedly.net
Tue May 11 19:05:09 EDT 2010


On 11/05/2010 04:51, David C. wrote:
> Then I get to build a second version that keeps the deleted "F" items
> in place while removing everything else.
> Oh what a joy. ;-)
>
As Geoff demonstrated, the efficient way to do this is with "repeat for 
each line ..." and build up a new output variable.

This is doubly true if you also need to do something with the deleted 
"F" lines ....

repeat for each line L in tMyData
    if char 1 of L = "F" then
       process L
       put L & CR after tOutputFLines
    else
      process L differently
      put L & CR after tOutputNonFLines
   end if
end repeat

-- Alex.



More information about the Use-livecode mailing list