Sort IP List

Bob Sneidar bobsneidar at iotecdigital.com
Fri Jun 29 18:33:16 EDT 2018


I have good news and bad news! 

function sortIPList2 pIPList
   set the itemdelimiter to "."
   try
      sort lines of pIPList ascending numeric \
            by (item 1 of each + 0) & \
            (item 2 of each + 0) & \
            (item 3 of each + 0) & \
            (item 4 of each + 0)
   catch theError
      breakpoint
   end try
   return pIPList
end sortIPList2

With a small subset of data, it doesn't error meaning I have some cruft in the data. Fair enough. The bad news is... IT DOESN'T SORT! LOL!!! Reversing the items does not help either. 

Bob S

> On Jun 29, 2018, at 15:16 , Mike Bonner via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Yup, that would be it!





More information about the use-livecode mailing list