Maybe this is easier to read:

ABC XYZ GGG

ACB XYZ GHH

ABC XYZ DEF

AAB XYZ GGG

AAC XYZ GHH

AAA XYZ DEF


gives

AAA XYZ DEF

AAB XYZ GGG

AAC XYZ GHH

ABC XYZ DEF

ABC XYZ GGG

ACB XYZ GHH


Each word is sorted in a stable way. The first word takes overall precedence. 
The second word takes second precedence and so on. There is no limit to the 
number of terms permitted in the code.

Craig

> On Mar 30, 2022, at 4:39 PM, Craig Newman via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Paul
> 
> I just reread your earlier post. Did you mean concatenating as if each line 
> became a single long word? That would never do, of course, and is not how the 
> line of code works.
> 
> Craig
> 
>> On Mar 30, 2022, at 4:26 PM, Paul Dupuis via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> On 3/30/2022 4:13 PM, Craig Newman via use-livecode wrote:
>>> A way I have always used was developed back in the HC days. Assuming you 
>>> have your list in the variable “yourList"
>>> 
>>> sort lines of yourList by word 1 of each & word 2 of each & word 3 of each
>>> 
>>> 
>> 
>> I used single letters as an example, but my text is tab delimited and each 
>> cell is moderately long text.
>> 
>> I think using "word 1 of each & word 2 of each & word 3 of each" or "item 1 
>> of each & item 2 of each & item 3 of each" concatenates all 3 "cells" 
>> together and sort by that string of characters. I think this could result in 
>> an invalid sort order of, for example, item 2 started with words found at 
>> the end of some items 1's.
>> 
>> 
>> 
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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

_______________________________________________
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

Reply via email to