Reversing a list

Sarah Reichelt sarah.reichelt at
Tue Apr 22 23:04:17 CDT 2008

On Fri, Apr 4, 2008 at 10:14 AM, Sarah Reichelt
<sarah.reichelt at> wrote:
> And the winner is.......
>  Jacque (with one modification).
>  local tCount
>  function reverseList pList
>     put the number of lines in pList into tCount
>     sort lines of pList by mySort()
>     return pList
>  end reverseList
>  function mySort
>     subtract 1 from tCount
>     return tCount
>  end mySort

OK, this realised this working for me and I finally figured out what
was going on - the sort needs to be numeric!
So change the "sort" line to this:

     sort lines of pList numeric by mySort()


More information about the use-livecode mailing list