sorting with number late in name

Klaus major-k klaus at major-k.de
Wed Dec 6 18:34:13 EST 2017


Hi Richard,

> Am 07.12.2017 um 00:29 schrieb Dr. Hawkins via use-livecode <use-livecode at lists.runrev.com>:
> 
> 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
klaus at major-k.de





More information about the Use-livecode mailing list