Dan -

I've been doing work in directories other than the J home for many months
now.
Maybe this is related to the old problem where you couldn't run J from
"Program Files"?
Or maybe there are still remaining bugs I haven't hit.

Bill -

you could generate the shell script each time.  Something like:
  sstemplate=: 0 : 0
cd {targdir}
{pgm} {args}
)

  ]sst=. ('{targdir}';'\usr\me\foo';'{pgm}';'./myexe';'{args}';'-bar 23')
multiReplace sstemplate
cd \usr\me\foo
./myexe -bar 23

  sst fwrite ssfl=. 'tempRun.bat'
31
shell ssfl

  NB. where we extend standard replace function:
multiReplace=: 4 : 0
NB.* multiReplace: multiple replacement, sequentially, using pairs in x.
NB. to alter y..
parms=. x. NB. Reshape vector arg to 2-col mat.
  if. 1=#shp=. $parms do. parms=. (0 2+0.5 0*2$shp)$parms end.
  template=. y.
  while. 0<#parms do.
      template=. (0{parms) replace template
      parms=. }.parms
  end.
  template
NB.EG ('s';'is';'this';'glorp') multiReplace 'ths s a tst'
)



On 3/1/07, Dan Bron <[EMAIL PROTECTED]> wrote:

Devon,

To clarify:  1!:44  does work.  It does exactly what it is documented to
do: changes J's working directory.  But there are certain parts of the J
system which assume J's working directory is J's home directory.  This
includes both binaries and scripts.

This may have changed since the introduction of the ~-style names in J6; I
don't know.  I just know what I learned through pain and fire:  avoid
changing J's working directory.

-Dan
----------------------------------------------------------------------
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

Reply via email to