parallel sort question

Jim Ault JimAultWins at yahoo.com
Mon Mar 6 15:33:58 EST 2006


Sorting by another field.
Parallel sort question

Is there an easy syntax for using the sort lines to do parallel sorting

I know how to :
sort lines of fld dataLines descending by the number of items of each

and
--using a function call to define the sortKey value (value sorted on)
sort lines of fld dataLines descending by supply2ndFldValue(word 1 of each)

function supply2ndFldValue lookupValue
  return lineOffset( lookupValue, fld orderValues)
end supplyFld2
--------------------
However, these do not work
sort lines of it descending by supplyFld2(line of each)
sort lines of it descending by supplyFld2(line number of each)

I will be scanning a list of combined data that will be evaluated to a
classification.  I would like to sort by that classification to achieve
grouping without adding that to the data field.

 I have done successive repeat loops to do this by
adding the class as word 1,
sort, 
then deleting word 1.
Works fine, but elegance is its own reward.

Basically, 'sort according to another list or field'

Thanks

Jim Ault
Las Vegas





More information about the Use-livecode mailing list