Re: sorting with number late in name

2017-12-07 Thread dunbarx via use-livecode
"...Ascending is implied when you sort numeric. "

"Ascending" is the default regardless of the sortKey. 

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
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


Re: sorting with number late in name

2017-12-06 Thread Tore Nilsen via use-livecode
Ascending is implied when you sort numeric. 

If you want to sort it the other way round use: sort lines of fld 1 numeric 
descending by item 2 of each

Tore

> 7. des. 2017 kl. 00:47 skrev Dr. Hawkins via use-livecode 
> :
> 
> Yes, that did it.  I had the item del, but had used "ascending" in the
> second line (probably from a prior misread of the dictionary years ago
> :)  )

___
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


Re: sorting with number late in name

2017-12-06 Thread Dr. Hawkins via use-livecode
On Wed, Dec 6, 2017 at 3:34 PM, Klaus major-k via use-livecode
 wrote:

> set itemdel to "_"
> sort lines of fld 1 numeric by item 2 of each


I *thought* that that was in there somewhere, but I didn't see it when
I  pulled the dictionary page :(  For that matter, the one I just
pulled didn't look a lot like what I was reading earlier.

Yes, that did it.  I had the item del, but had used "ascending" in the
second line (probably from a prior misread of the dictionary years ago
:)  )

thanks

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462

___
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


Re: sorting with number late in name

2017-12-06 Thread Klaus major-k via use-livecode
Hi Richard,

> Am 07.12.2017 um 00:29 schrieb Dr. Hawkins via use-livecode 
> :
> 
> Now that I've hit ten numbered items, I'm having an issue with
> maintenance routines.
> 
> If I have the items
> 
>  p13_1.07
>  p13_1.08
>  p13_2.04
>  p13_10.01
> 
> I want them to sort in that order.  However, the 10 will sort between
> the 1s and 2s.

"numeric" is the magic word! :-)

> Is there a "decent" way to do this without a custom function?
> 
> All I'm coming up with so far is a script that looks for a single
> digit number and renames to put a 0 in front of it . . .

...
set itemdel to "_"
sort lines of fld 1 numeric by item 2 of each
...
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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


Re: sorting with number late in name

2017-12-06 Thread Tore Nilsen via use-livecode
You could always try to set the itemDelimiter to _ and then sort the lines 
numeric by last item of each.

Tore Nilsen

> 7. des. 2017 kl. 00:29 skrev Dr. Hawkins via use-livecode 
> :
> 
> Now that I've hit ten numbered items, I'm having an issue with
> maintenance routines.
> 
> If I have the items
> 
>  p13_1.07
>  p13_1.08
>  p13_2.04
>  p13_10.01
> 
> I want them to sort in that order.  However, the 10 will sort between
> the 1s and 2s.
> 
> Is there a "decent" way to do this without a custom function?
> 
> All I'm coming up with so far is a script that looks for a single
> digit number and renames to put a 0 in front of it . . .
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> 
> ___
> 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


sorting with number late in name

2017-12-06 Thread Dr. Hawkins via use-livecode
Now that I've hit ten numbered items, I'm having an issue with
maintenance routines.

If I have the items

  p13_1.07
  p13_1.08
  p13_2.04
  p13_10.01

I want them to sort in that order.  However, the 10 will sort between
the 1s and 2s.

Is there a "decent" way to do this without a custom function?

All I'm coming up with so far is a script that looks for a single
digit number and renames to put a 0 in front of it . . .

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462

___
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