> Thierry wrote: > sort lines of T numeric by AaZz_sort( each) > function AaZz_sort x > get chartonum( char 1 of x) > if IT > 96 then return ( IT - 96) * 2 + 1 > else return ( IT - 64) * 2 > end AaZz_sort
Hi Thierry, don't you need a second sort as 'primary' sort? sort lines of T numeric by each & AaZz_sort( each) ? sort lines of T Else the container is sorted by the first char of each line only. But your ASCII-number-formula for uppercase/lowercase A-Za-z ordering is really worth to go in a lib! Hermann By the way, my "solution" is the following, that handles uppercase char before lowercase char sorting for each char of the lines. set the casesensitive to true -- secondary sort: sort myContainer set the casesensitive to false -- primary sort: sort myContainer _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode