I wasn't positive that there would be a written
misstatement, more an insufficiency of written statement.

To start, here are a few informative references,
where it is prominent and well-explained.

Eric Iverson, J Primer, When they aren't
  http://www.jsoftware.com/help/primer/when_not_same.htm
(script locals are in scope of "load")

Roger Stokes, Learning J, 26.5 Local Definitions in Scripts
  http://www.jsoftware.com/help/learning/26.htm#04
(detailed account of script locals with 3 : ' ')

Henry Rich, J For C Programmers, 29. Modular Code, Assignment
  http://www.jsoftware.com/help/jforc/modular_code.htm#_Toc141158126
(a small note about load in context of so-called "private" assignments.)


But I was not able to find anything in normative
references: Dictionary or User Manual, etc.
Could be mentioned or referenced in H. Frets and Scripts
   http://www.jsoftware.com/help/dictionary/dicth.htm
or in Scripts Foreign Conjunction (where it also does not
say about boxed and unboxed argument differences)
   http://www.jsoftware.com/help/dictionary/dx000.htm


Here are a few places from the forum using random search,
that hint at some confusion or vagueness.

[Jprogramming] Standalone Error wdhandler_base_
http://www.jsoftware.com/pipermail/programming/2007-August/007715.html
http://www.jsoftware.com/pipermail/programming/2007-August/007720.html

[Jprogramming] local and global assignment in different locales
http://www.jsoftware.com/pipermail/programming/2007-August/007712.html

[Jprogramming] Standalone Error wdhandler_base
http://www.jsoftware.com/pipermail/programming/2007-August/007702.html

[Jgeneral] unexpected result
http://www.jsoftware.com/pipermail/general/2007-March/029247.html
[Jprogramming] Fix local names
http://www.jsoftware.com/pipermail/programming/2007-January/004649.html
(emphasis on "script", not explicit scope)

[Jprogramming] Something almost cool - maybe a bug
http://www.jsoftware.com/pipermail/programming/2006-March/001573.html

[Jbeta] Global Assignment Error outside an Explicit Definition
http://www.jsoftware.com/pipermail/beta/2006-February/000505.html
http://www.jsoftware.com/pipermail/beta/2006-February/000503.html

[Jforum] Scripts Won't Run
http://www.jsoftware.com/pipermail/general/2005-April/021472.html
(explained in terms of "script" not explicit scope)

[Jforum] Running a Script
http://www.jsoftware.com/pipermail/general/2005-March/021224.html
(not knowing about explicit origin script scope)

Jforum: =. vs =: in scripts
http://www.jsoftware.com/pipermail/general/2002-May/009466.html
http://www.jsoftware.com/pipermail/general/2002-May/009849.html
(older "loads" were tacit leaving script local in global scope)



--- Roger Hui <[EMAIL PROTECTED]> wrote:

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



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to