Of course!

I've got to step away from the computer.  Sorry for the dumb question.

Thanks for your help Don.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Don Guinn
Sent: Wednesday, April 22, 2009 4:25 PM
To: Programming forum
Subject: Re: [Jprogramming] Converting IP addresses

Use 256 instead of 255. Each number represents a byte with 256 possible
values.
   (4$256)#.69 255 248 210
1174403282

   (4$256)#:1174403282
69 255 248 210

On Wed, Apr 22, 2009 at 3:15 PM, Lettow, Kenneth
<[email protected]>wrote:

> How do you convert a IP address from dotted quad representation to
> integer and back in J?
>
> I was experimenting with base and antibase, but got stuck.
>
> NB. IP address: 70.0.248.210
>
>   (4$255)#. (70 0 248 210)
> 1160759700
>
>   (4$255)#:1160759700
> 70 0 248 210
>
> So far so good, but
>
>   (4$255)#.69 255 248 210
> 1160759700
>
>   (4$255)#:1160759700
> 70 0 248 210
>
> What am I missing?
>
> Thanks,
>
> Ken
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to