parallel sort question

J. Landman Gay jacque at hyperactivesw.com
Mon Mar 6 16:49:37 EST 2006


Jim Ault wrote:
> Sorting by another field.
> Parallel sort question
> 
> Is there an easy syntax for using the sort lines to do parallel sorting

There is nothing built-in, but I've used this:


local lKeyData, lLineCounter

on sortBy keyField -- parallel sorting of linked flds
   put fld keyField into lKeyData
   put "data1,data2,data3" into dataFields -- fill in your fld names here
   repeat with i = 1 to the number of items of dataFields
     put 0 into lLineCounter
     sort lines of fld (item i of dataFields) by key()
   end repeat
end sortBy

function key
   add 1 to lLineCounter
   return line lLineCounter of lKeyData
end key


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the Use-livecode mailing list