Re: Sorting IP addresses
Re: Sorting IP addresses
- Subject: Re: Sorting IP addresses
- From: Marconi <email@hidden>
- Date: Fri, 19 Dec 2003 00:04:25 -0700
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
180.248.136.220 3.036186844E+9
61.116.186.110 1.031060078E+9
205.158.62.24 3.449699864E+9
217.81.172.103 3.646008423E+9
0.57.7.195 3737539
24.203.237.101 4.16017765E+8
62.78.76.79 1.045318735E+9
202.156.235.48 3.399281456E+9
214.240.46.232 3.606064872E+9
24.31.170.237 4.04728557E+8
16.208.21.156 2.82072476E+8
24.203.237.101 4.16017765E+8
62.78.76.79 1.045318735E+9
69.84.204.85 1.163185237E+9
217.117.136.154 3.648358554E+9
166.78.247.22 2.790192918E+9
202.175.98.191 3.400491711E+9
63.138.247.187 1.066071995E+9
4.176.70.236 78661356
Thanks to those who have sent me scripts and answered my questions but the proffered scripts don't work.
Seems like sorting 4 times is sounding better all the time.
_______________________________________________
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.