There should be a "unique" option on sort . . .

dunbarx at dunbarx at
Sun Jan 5 19:00:16 EST 2014

Or, (untested)

repeat for each line tLine in tData --unsorted
  if tLine is not among the lines of tFinal then put tLine & return after tFinal
end repeat
sort tFinal --if desired

But using Peter's "split" post is the most elegant


-----Original Message-----
From: Geoff Canyon <gcanyon at>
To: How to use LiveCode <use-livecode at>
Sent: Sun, Jan 5, 2014 5:27 pm
Subject: Re: There should be a "unique" option on sort . . .

   *put* line 1 of tSortedData is false into lastLine

   *repeat* for each line L in tSortedData

      *if* L is lastLine *then* *next* *repeat*

      *put* L & cr after tUniqueData

      *put* L into lastLine

   *end* *repeat*

Either that or some form of Peter's de-dupe and then sort.
use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription 


More information about the Use-livecode mailing list