sort by length of line (Weird)
dunbarx at aol.com
dunbarx at aol.com
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 sonsothunder.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
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:
1
10
11
2
3
4
(etc.).
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")
(etc.)
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 sonsothunder.com
Web Site: http://www.sonsothunder.com/
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list