[REBOL] converting I.P. Addresses to integer Re:
From: kgd03011:nifty:ne:jp at: 2-Aug-2000 1:00
Hi Larry, You wrote:>tup-to-num: func [x /local out][ > out: 0.0 > x: head reverse parse to-string x "." > repeat j 4 [ > out: out + (256.0 ** (j - 1) * to-integer x/:j) > ] >]How about ... ? tup-to-num2: func [x /local z out][ out: 0.0 repeat j length? x [ out: out * 256 + pick x j ] ] See you, Eric