How to tell if a name is global?
 
nc gives the name class of both local and global names, 
gnc returns _1 unless the name is global (except "y"):
 
gnc=: 3 : '4!:0 y'
 
   a=.1
   3 : 'gnc <''a'' [ a=.1  '$0
0
   a=. +
   3 : 'gnc <''a'' [ a=.1  '$0
3
   erase <'a'
1
   3 : 'gnc <''a'' [ a=.1  '$0
_1



----- Original Message ----
From: R&S HUI <[EMAIL PROTECTED]>
To: Beta forum <[email protected]>
Sent: Tuesday, July 11, 2006 8:01:50 PM
Subject: Re: [Jbeta] modification of f. adverb


I think f. itself was a bad idea so I would be reluctant to 
add F. .

In most cases, you can distinguish local from global names 
by processing the text of the definition.  In general you
can not because of ". and the like.



----- Original Message -----
From: Andrew Nikitin <[EMAIL PROTECTED]>
Date: Tuesday, July 11, 2006 4:51 pm
Subject: [Jbeta] modification of f. adverb

> Many times I wished there was equivalent of f. adverb (say, F. adverb) that
> bounds only locally defined names and leaves globally defined names untouched.
> 
> If nobody else thinks it is a good idea, I would appreciate any comments on
> how to implement such adverb in J. Specifically, how to tell difference
> between local and global names.


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