Hi all. 

I somehow got on to how to sort IP addresses, seeing they are not real numbers, 
and read in the dictionary that the sort command is a "stable sort". This 
occured to me:

function sortIPList pIPList
   set the itemdelimiter to "."
   sort lines of pIPList numeric by item 4 of each
   sort lines of pIPList numeric by item 3 of each
   sort lines of pIPList numeric by item 2 of each
   sort lines of pIPList numeric by item 1 of each
   return pIPList
end sortIPList

Enjoy! 

Bob 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

Reply via email to