4!:3'' gives a list of script files loaded (I unboxed to make the list
easier to see and I showed only a few of the files in the list)

   >4!:3''
C:\j64-602\bin\profile.ijs
C:\j64-602\system\extras\util\boot.ijs
C:\j64-602\system\main\sysenv.ijs
C:\j64-602\system\main\stdlib.ijs
C:\j64-602\system\main\colib.ijs
C:\j64-602\system\main\break.ijs
C:\j64-602\system\main\winlib.ijs
C:\j64-602\system\extras\util\jadefull.ijs
C:\j64-602\system\extras\config\scripts.ijs
C:\j64-602\system\extras\util\jijs.ijs
C:\j64-602\system\extras\util\cfgread.ijs


4!:4<'some name' gives the index into that list where the name is defined,
if it is defined in a script.
   4!:4<'list'
3

In this case the name "list" is defined in script at index 3. So "list" is
defined in stdlib.ijs.

In your script define a name then find the index of where the name is
defined. Use 4!:3 to get the file name. The library that the script came
from is the part before the last slash (/).

On Thu, Apr 8, 2010 at 9:42 AM, Sprague, Webb (OFM) <[email protected]
> wrote:

>
> >> 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 ....
>
> > That depends -- what information do you know?
>
> I am not sure how to answer this question... I want my J script to do the
> work for me, and tell me what its pathname is while it is being run.
>
> I don't want to provide a pathname exogenously to the script, for various
> reasons. (I can explain if it matters.)
>
> --
> Raul
> ----------------------------------------------------------------------
> 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