On Saturday, June 28, 2003, at 09:56 AM, Dar Scott wrote:
function removeDoubles theLines replace LF with "|" & "x" & LF in theLines split theLines using LF and "|" return keys( theLines ) end removeDoubles
Wondering about the speed of that, I made this reference function:
function removeDoubles theLines
if theLines is empty then return empty
sort theLines
put line 1 of theLines into recentLine
put recentLine into accumulatedLines
repeat for each line l in theLines
if l is not recentLine then
put LF & l after accumulatedLines
put l into recentLine
end if
end repeat
return accumulatedLines
end removeDoublesThe set method is almost 3 times as fast as the above function for the lists I tried.
Dar Scott
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
