Sort a container - AScending / Descending

Sarah Reichelt sarah.reichelt at gmail.com
Mon Jul 20 23:33:43 EDT 2009


On Tue, Jul 21, 2009 at 12:57 PM, Warren Kuhl<warrenkuhl at gmail.com> wrote:
> Is there anyway to sort multiple items in a variable mixing ascending and
> descending?
>
> ie. sort lines of tData by word 1 of each, word 2 of each, word 3 of each
> ...where word 1 and word 2 are acscending and word 3 is descending.

Sorts are non-destructive, so just do them in sequence with the least
important first and the most important last.
e.g.

sort lines of tData descending by word 3 of each
sort lines of tData by word 2 of each
sort lines of tData by word 1 of each

(I may have got this the wrong way around, but just alter the order of
the lines to get what you want.)

HTH,
Sarah



More information about the use-livecode mailing list