Devon,

I should have offered a cavaet with that trick.  If  4!:4  can't figure out the 
script in which the name was defined, it'll return  _1  .  Of course, that 
picks the last item out of  4!:3  , so it appears as if the name was defined in 
the last script loaded.  

In your case, the last script loaded was  ~Extras/util/browser  , probably 
because you pressed  F1  or CTRL+F1  .  That script (at least on my system) 
does not define the name  each  :


           +./ 'each' E. fread jpath '~Extras\util\browser.ijs'
        0
   
There are several cases in which  4!:4  can fail to find the name-defining 
script.  The most common case is:  there is no such script.  That happens when 
you define the directly in the IJX session, e.g.:

        
           rp =:  tofoldername_jijs_ 
        
           rp (4!:4{.;:'each') {:: 4!:3''
        +----------------+
        |~Main\stdlib.ijs|
        +----------------+
        
           each =: "0
        
           rp (4!:4{.;:'each') {:: 4!:3''
        +-----------------+
        |~Main\strings.ijs|
        +-----------------+

           rp {: 4!:3''
        +-----------------+
        |~Main\strings.ijs|
        +-----------------+

           4!:4{.;:'each'
        _1
           

Other cases where  4!:4   can "fail" include locale/locative discrepancies.  
The best way to debug this problem is to open a fresh, virgin J session, 
without your personal startup script.  Check the definition of  each_z_  (and  
each  without the locative qualifier).  If it is  &.>  then convince yourself 
that  browser.ijs  is not the offender by pressing F1 and checking the 
defnition of  each  again.

If, in either case, it turns out a script packaged with the J system is at 
fault, please download and install the newest base library.  I believe you 
previously installed JAL; you may use that to upgrade.

If a J script is not at fault, then set  DISPLAYLOAD_j_=:1  and load your 
personal startup script.  Now check the definition of  each  .  If it is  &.>  
, you have no worries; the problem was transient (you probably redefined  each  
by hand in the other session).  

But, if  each  is now  "0  , since you set  DISPLAYLOAD  , you'll have a list 
of all your personal scripts which are loaded at startup;  check those.  You 
might find "Find in Files" (particularly with the regex option) useful.

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

Reply via email to