Couple questions (of course .. and thanks for your'all's patience...)

> > For example, if I have a program stored in C:\STUFF\foo.ijs, I would
> > like to be able to say "sourcepath=.<J MAGIC HERE>" and then later
> "load
> > (sourcepath,bar.ijs)" in order to load a program that is stored in
> the
> > same directory.
> 
> filepath=: 'c:\stuff\foo.ijs'
> dirname=: #~  '/\' +./\...@e.~ ]
> 
>    dirname filepath
> c:\stuff\

So "dirname" pulls out the dir part, but how do we get "filepath" in the
first place?  I want to grab it dynamically; but maybe the answer
relates to the second part ....

> As for Chris Burke's response, let us say that
> you wanted to know which file contained the
> definition for the word 'define', on your system.
> 
> To find that, you could run:
> 
>    (4!:4<'define') {:: 4!:3''

.... Should I use this with a subroutine definition to find the
subroutine's path?  I would rather do it in the outside part of a script
file.  Though this is definitely a good thing to know.

Thanks!
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to