sort by length of line (Weird)

dunbarx at dunbarx at
Mon Dec 12 17:19:37 EST 2011

Well, well.

I never would have thought it was doing that, though I get it. 

Thanks all. 

-----Original Message-----
From: Ken Ray <kray at>
To: How to use LiveCode <use-livecode at>
Sent: Mon, Dec 12, 2011 8:08 am
Subject: Re: sort by length of line (Weird)

On Dec 12, 2011, at 11:09 AM, Mark Schonewille wrote:

> Try numeric.

Right - Here's an explanation: when you sort by length, what gets sorted is the 
actual *numbers* themselves, so unless you tell LC to "sort numeric", you'll get 
things in this order:


With your data, it would be:

10    (the length of "DEZINCKING")
11    (the length of "RAZORBACKS")
13    (the length of "ZOOPLANKTONIC")
6      (the length of "ZINCKY")
6      (the length of "ZEBECK")

So if you do:

  sort numeric tData by length(each)

you'll get what you're looking for…

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at
Web Site:	

use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription 


More information about the Use-livecode mailing list