On Mon, Sep 14, 2009 at 10:13 PM, bill lam <[email protected]> wrote:
> You could switch locale inside A as Raul suggested ..
Actually, I was referring to the way I had defined the class.
In other words, instead of :
A_N1_=:1 :0
this=.;coname''
''1 :('f_',this,'_')
)
n_N1_=: 0
f_N1_=: 3 :0
n=:n+y
)
You could have used:
coclass'N1'
A=:1 :0
this=.;coname''
''1 :('f_',this,'_')
)
n=: 0
f=: 3 :0
n=:n+y
)
But coclass leaves you in that class's definition if you execute
this in your main session instead of from a script. So some
people like to end class definitions with
cocurrent 'base'
to avoid problems with this issue.
But for small classes, I think it's more concise to explicitly name
the class in all of the class's definitions.
FYI,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm