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



> On Jun 29, 2018, at 10:29 , Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> sort lines of plist  ascending numeric by item 1 of each &  item 2 of each &
> item 3 of each & item 4 of each  -- reverse this for your desired sort
> doesn't sort numerically (even if each key is forced to numeric with a + 0)


_______________________________________________
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