Sort IP List

Bob Sneidar bobsneidar at iotecdigital.com
Fri Jun 29 17:17:38 EDT 2018


Yeah, no I get runtime error. <sigh> 

> On Jun 29, 2018, at 14:09 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Yes because your ampersand operator is not passing different arguements, it's concatenating the items together so that 10.2.245.6 produces the integer 1022456. But 10.22.2.6 produces 102226 which is smaller, but ought to sort higher. Hence the 4 pass sort. 
> 
> But you got me thinking, what if you did something like:
> 
> set the numberformat to "000"
> sort lines of tIPList numeric by \
>   value(item 1 of each +0) & \
>   value(item 2 of each +0) & \
>   value(item 3 of each +0) & \
>   value(item 4 of each)
> 
> Bob S





More information about the use-livecode mailing list