I care! if you leave, there will be no oldtimers left anymore (except slennox that is) which would be sadcaesar wrote:(as if someone would care, anyway).
Code: Select all
% a2n 128.0.0.0
2147483648
% n2a 2147483648
128.0.0.0
Code: Select all
proc n2a {n} {
foreach i {24 16 8 0} {append s [format %d. [expr ($n>>$i)&0xFF]]}
return [string trimright $s .]
}
proc a2n {s} {
foreach {a b c d} [split $s .] {return [expr 0xFFFFFFFF&(($a<<24)+($b<<16)+($c<<8)+$d)]}
}