@Eric - tried that too.

The "load" verb contains the line:   Loaded_j_=: ~. Loaded_j_,fl

so although I know the path I need is in Loaded_j_ somewhere, I can't tell
which one it is.

I've also tried modifying load, assigning the local: (fl)  to a
guaranteed-unique _z_ or _j_ pronoun before it gets lost. That doesn't
always work either, except with non-nested loads. I admit I don't know why
(it looks as if it can't fail!) and I've been too busy to go looking.

Unless someone knows a *guaranteed* way, I'm going to book it at
https://code.jsoftware.com/wiki/System/Interpreter/Requests


On Tue, 9 Apr 2019 at 14:22, Eric Iverson <eric.b.iver...@gmail.com> wrote:

> Ian,
> I don't think 4!:3 meets your needs (duplicates). The load verb maintains
> Loaded_j_ and this might meet your needs.
>
> On Tue, Apr 9, 2019 at 8:49 AM bill lam <bbill....@gmail.com> wrote:
>
> > Does this work?
> >
> > MYSCRIPT=: >{:4!:3''
> >
> > On Tue, Apr 9, 2019, 8:29 PM Ian Clark <earthspo...@gmail.com> wrote:
> >
> > > How can I *reliably* fetch the path of the script being loaded, whilst
> it
> > > is being loaded?
> > >
> > > Everything I've tried either fails or fingers the wrong script on
> > > occasions. Especially if my script is the subject of "load" or
> "require"
> > by
> > > another script.
> > >
> > > I want to be able to write at the top of my script, say
> > >
> > > cocurrent 'myloc'
> > > MYSCRIPT=: theScriptCurrentlyBeingLoaded''
> > > ----------------------------------------------------------------------
> > > 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to