>From http://www.jsoftware.com/help/dictionary/d310n.htm

 3.  ... A name assigned by =: is global, except 
 that global assignment to a local name is not 
 permitted.  ...

In testLocalGlobal, var is local, and the assignment
   var=: localGlobal ''
would have been global and is therefore not permitted.



----- Original Message -----
From: Devon McCormick <[EMAIL PROTECTED]>
Date: Tuesday, January 2, 2007 2:42 pm
Subject: [Jgeneral] Domain Error - local vs. global confusion

> Can someone explain why this error makes sense?
> 
> localGlobal=: 3 : 'var=: ''global in "localGlobal"'''
> 
> testLocalGlobal=: 3 : 0
>   var=. 'local in "testLocalGlobal"'
>   smoutput '"var" = ''',var,'''.'
>   var=: localGlobal ''
>   smoutput '"var" = ''',var,''' after "localGlobal ''''".'
> )
> 
>   testLocalGlobal ''
> "var" = 'local in "testLocalGlobal"'.
> |domain error: testLocalGlobal
> |   var    =:localGlobal''


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

Reply via email to