There should be a "unique" option on sort . . .
Geoff Canyon
gcanyon at gmail.com
Mon Jan 6 01:08:55 EST 2014
I ran a brief speed test of the code below against using an array to
de-dupe and then sort the keys, and couldn't find a data set that made the
below code slower. It's not always much faster, but for some data sets it
is.
On Sun, Jan 5, 2014 at 5:26 PM, Geoff Canyon <gcanyon at gmail.com> wrote:
> *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.
>
More information about the use-livecode
mailing list