Re: Sorting IP addresses
Re: Sorting IP addresses
- Subject: Re: Sorting IP addresses
- From: Matthew Smith <email@hidden>
- Date: Fri, 19 Dec 2003 18:43:48 +1100
on 19/12/2003 18:04, Marconi at email@hidden wrote:
>
Well, I went with the idea to separate each IP address into quads and convert
>
the quads to a really big number. In the list below, the number following each
>
IP address is (quadOne * (256 ^ 3)) + (quadTwo * (256 ^ 2)) + (quadThree *
>
256) + quadFour
>
>
So my next question is: What kind of routine will properly sort values in
>
scientific notation?
>
>
>
24.47.176.225 4.05778657E+8
Did anyone suggest adding leading zeros to each part and sorting as text?
It's even readable.
24.47.176.225 -> 024.047.176.225
--
Matthew Smith
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.