On Saturday, June 28, 2003, at 12:15 AM, Yves COPPE wrote:
function commonLines pList1, pList2
repeat for each line tLine in pList1
put 1 into tArray[tLine]
end repeat
repeat for each line tLine in pList2
if tArray[tLine] = 1 then
put 2 into tArray[tLine]
put tLine & cr after tRetVal
end if
end repeat
delete char -1 of tRetVal
return tRetVal
end commonLines
I wonder if this is a good excuse to tinker with intersect. This looks very close to working with sets.
Maybe there is a fast way with replace and split to turn a list into a set.
I suppose keys() can turn a set back into a list.
Order would not be preserved, though.
Dar Scott
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
