Actually, you don't have to. See the socket.ijs. There is sdgethostname verb.
Sorry for the confusion. 2006/11/18, June Kim <[EMAIL PROTECTED]>:
You can use dll.ijs to call wsock32's gethostname (remeber to call WASStartup first) if you are on windows. 2006/11/18, Devon McCormick <[EMAIL PROTECTED]>: > Sorry - "dsp" is probably my own despacer: dsp=: 3 : 'y.-.'' ''' > or something like this (I'm not on my own machine right now so I can't > check). > Alternately, it might just be a cover for a J standard function like "dlt". > > On 11/17/06, Tom Arneson <[EMAIL PROTECTED]> wrote: > > > > I was too fast, or didn't read your full message. After I loaded 'task' it > > hangs up on dsp > > > > > > load 'c:\j601\temp\2.ijs' > > myIPAddress '' > > |value error: spawn > > | sess=. spawn'ipconfig' > > load 'task' > > myIPAddress '' > > |value error: dsp > > | sess=. dsp&.><;._1 LF,sess-.CR > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Devon McCormick > > Sent: Thursday, November 16, 2006 21:01 > > To: Programming forum > > Subject: Re: [Jprogramming] Verb to return own IP number? > > > > For Windows, this seems to work OK (uses Oleg's "task"): > > > > NB.* myIPAddress: return my own IP address (assumes Windows). > > myIPAddress=: 3 : 0 > > sess=. spawn 'ipconfig' > > sess=. dsp&.><;._1 LF,sess-.CR > > ipa=. >sess{~(sess{.~&.>#str) i. <str=. 'IP Address' > > ipa}.~2+ipa i: ':' > > ) > > > > > > On 11/16/06, Joey K Tuttle <[EMAIL PROTECTED]> wrote: > > > > > > At 19:20 +0000 2006/11/16, Ronan Reilly wrote: > > > >Hi All, > > > > > > > >I'm running a distributed application on a cluster using J and I need a > > > verb > > > >that returns the IP (or hostname) of the node on which the jconsole is > > > >running. > > > > > > > >Thanks for any help. > > > > > > > > > > Assuming you are in a _NIX environment, 2!:0 (Host) is > > > the key - e.g. I would use: > > > > > > host 'echo $HOSTNAME' > > > > ... > > -- > > Devon McCormick > > ^me^ at acm. > > org is my > > preferred e-mail > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm >
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
