sort lines by length

Dave Cragg dave.cragg at lacscentre.co.uk
Tue Sep 23 16:59:39 EDT 2014


On 23 Sep 2014, at 20:07, Klaus major-k <klaus at major-k.de> wrote:

> Hi Larry,
> 
> Am 23.09.2014 um 20:53 schrieb <larry at significantplanet.org> <larry at significantplanet.org>:
> 
>> Hello,
>> 
>> this line doesn't work:
>> sort lines of field "myField" by length of each
>> 
>> Can someone please tell me the code for sorting a field by length of line?
> 
> this compiles and kinda works, but not as exspected :-/
> ...
> sort lines of fld 1 by length(each)
> ...


sort lines of fld 1 numeric by length(each)

I think "numeric" is needed if the lengths can be over 9 characters. Otherwise it will do a text sort on the lengths.

Cheers
Dave



More information about the use-livecode mailing list