Do you have any evidence that this misconception (a script having its own locals) is universal?
Perhaps the extent of the misconception is due to the fact that the J IDE itself uses "load" and other explicitly defined tools like "script" (e.g. to implement "Run|Window"), and 0!:n are seldom used on their own. I do not think that the documentation that I am responsible for (dictionary, release notes) would say that a script has its own locals. ----- Original Message ----- From: Oleg Kobchenko <[EMAIL PROTECTED]> Date: Tuesday, August 7, 2007 16:10 Subject: Re: [Jprogramming] Standalone Error wdhandler_base_ To: Programming forum <[email protected]> > --- Raul Miller <[EMAIL PROTECTED]> wrote: > > > On 8/7/07, Roger Hui <[EMAIL PROTECTED]> wrote: > > > There have not been any changes in the interpreter > > > in this regard. Perhaps the defn of "load" was changed > > > and that could have changed the behaviour. Or perhaps > > > you did your experiments using "load", thinking that > > > it was equivalent to 0!:0@< . > > > > On reflection, I have realized that this latter is the case: > > > > I was thinking that the local context I saw when using > > 'load' was a property of 0!:0 rather than being a consequence > > of load having an explicit (rather than tacit) definition. > > And this realization is what I referred to as unveiling the > misconception about the 0!:0 context. > > It might have been rooted in some written documentation, > because this misconception is universal. We need to look at > various places where 0!:0 and scripts are mentioned. > Or probably, the truth is not straight and clear enough. > The reality turns out to be much simpler. > > > This mechanism of local script variables visible to > the scope of the loading function may have some interesting > applications, such as custom loaders which can be > parameterized with temporary local variables defined > in the script(s). > > Or it could be thought of functions mutating their bodies > at run time with code from nouns or even script files. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
