Sort problem

Yves Coppé yvescoppe at skynet.be
Tue Sep 10 10:32:01 EDT 2002


>Hi Yves,
>
>You could try something like this:
>
>set the useSystemDate to true
>set itemdel to tab
># push the lines with the same date together
>repeat for each line tLine of my_var
>   if item 1 of tLine is not a date then
>     put "@#@#" & tLine after tPrepVar
>   else
>     put return & tLine after tPrepVar
>   end if
>end repeat
>put char 2 to -1 of tPrepVar into my_var
># now do the sorting on our squished variable
>sort lines of my_var descending dateTime \
>by item 1 of each
># and unsquish the result onto separate lines
>replace "@#@#" with return in my_var
># the end...
>
>Hope this helped,
>
>Jan Schenkel.

Fantastic...and so easy !!!

Thanks.



More information about the use-livecode mailing list