Hello Ya'll,
I am trying to sort some tab delimited data by item 1 of each. Item 1 of
each is a name and a number.
Kansas 1
Kansas 3
MO 3
MO 8
Anyhow, when I run the sort as
sort lines of sReportText by item 1 of each
I get it sorted pretty close, but entries with the same name and a
Hi Andrew,
AFAIR, you can pile the sort command one after the other, as:
sort lines of sReportText numeric by item 2 of each
sort lines of sReportText by item 1 of each
HTH.
Thierry
Thierry Douez - http://sunny-tdz.com
Maker of
. Mai 2013 19:06
An: How to use LiveCode
Betreff: text sortType
Hello Ya'll,
I am trying to sort some tab delimited data by item 1 of each. Item 1 of
each is a name and a number.
Kansas 1
Kansas 3
MO 3
MO 8
Anyhow, when I run the sort as
sort lines of sReportText by item 1
. Mai 2013 19:06
An: How to use LiveCode
Betreff: text sortType
Hello Ya'll,
I am trying to sort some tab delimited data by item 1 of each. Item 1 of
each is a name and a number.
Kansas 1
Kansas 3
MO 3
MO 8
Anyhow, when I run the sort as
sort lines of sReportText
toolb...@kestner.de
To: 'How to use LiveCode' use-livecode@lists.runrev.com
Sent: Tue, May 28, 2013 1:35 pm
Subject: AW: text sortType
How about sorting twice
sort lines of sReportText numeric by item 2 of each
sort lines of sReportText by item 1 of each
didn't tested
Tiemo
-Ursprüngliche
Sent: Tue, May 28, 2013 1:35 pm
Subject: AW: text sortType
How about sorting twice
sort lines of sReportText numeric by item 2 of each
sort lines of sReportText by item 1 of each
didn't tested
Tiemo
-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun
.
Craig Newman
-Original Message-
From: Tiemo Hollmann TB toolb...@kestner.de
To: 'How to use LiveCode' use-livecode@lists.runrev.com
Sent: Tue, May 28, 2013 1:35 pm
Subject: AW: text sortType
How about sorting twice
sort lines of sReportText numeric by item 2 of each
sort lines
.
Craig Newman
-Original Message-
From: Tiemo Hollmann TB toolb...@kestner.de
To: 'How to use LiveCode' use-livecode@lists.runrev.com**
Sent: Tue, May 28, 2013 1:35 pm
Subject: AW: text sortType
How about sorting twice
sort lines of sReportText numeric by item 2 of each
sort
On 5/28/13 2:09 PM, Andrew Kluthe wrote:
That would handle it for the most part, jaque, but some of the data has
multiple words in the first item.
Here is a real sample of the most intricate of the data I would be sorting
in that first item.
MA West Creek 14
This would be a string to
tested seems to work:
sort lines of x numeric by word -1 of item 1 of each
sort lines of x by word 1 to -2 of item 1 of each
On Tue, May 28, 2013 at 2:26 PM, J. Landman Gay jac...@hyperactivesw.comwrote:
On 5/28/13 2:09 PM, Andrew Kluthe wrote:
That would handle it for the most
The following worked for me (with apologies ofr any asterisks that may be
inserted into the script by my email client)
It assumes there won;t be any numbers 6 digits.
*on* mouseUp
*sort* lines of field Field by reformatLine(each)
*end* mouseUp
*function* reformatLine l
*local* tKey
I think this and Geoff's are good! This one is more general if you can come up
with some sort of metric or sortvalue for each item/list. Geoff's is simpler
for this case. The speed difference will depend on the length of the list.
Shouldn't the zero be put 'before' instead of 'after' to
Whoops, I didn't read Peter's solution all the way.
I guessed at what he was doing instead of giving it the attention it deserved.
I guess my thumbs up was for using the sorting value function and for putting
in zero digits.
I would (off the top of my head) simplify (and change) that to
Yes,
Geoff's is definitely simpler, hadn't seen it when I made my post. It did
give me the opportunity to finally use the custom function feature of the
sort command though!
I like the shortcut!
After is right in my code - I put the words into tKey, then the zeros,
then the number. With your
Great minds think alike! That is the same return command I used! Switching to
capital L is a good idea, lower case l is hard to read.
And you are right, I was so caught up in how I wanted to do it, I didn't see
that yours should work, too, based on 'after'.
And you are right, this is a
Interesting -- this works in one line:
sort lines of x by word 1 to -2 of item 1 of each char -10 to -1 of
(00 word -1 of item 1 of each)
I'm a little put off by not using the native numeric -- I'd be worried
that something I'm not thinking of right now would break it. But
On May 28, 2013, at 3:37 PM, Geoff Canyon wrote:
I'm a little put off by not using the native numeric -- I'd be worried
that something I'm not thinking of right now would break it. But
nevertheless, it works.
You mean like 0x4B?
Or 34.0?
Or E notation?
Or -Inf?
Dar
Overall, I'd be inclined to use your solution Geoff - much easier to read
whereas the others are the type of thing where you come back to it in a few
months (or someone else looks at it the next day) and you think what the
hell is that!
Pete
lcSQL Software http://www.lcsql.com
On Tue, May 28,
Wow, such a plethora of solutions! Thank you. Worked like a charm. I just
wasn't thinking it through clear enough.
Andrew
On Tue, May 28, 2013 at 6:14 PM, Peter Haworth p...@lcsql.com wrote:
Overall, I'd be inclined to use your solution Geoff - much easier to read
whereas the others are the
19 matches
Mail list logo