From: *Henry Rich* <[email protected]>
Date: 1 May 2016 at 18:11
To: [email protected]


I have fixed the long-standing bug in append-in-place etc that aliased
local and global names:

   a =. i. 5
   v =. 3 : 'a =. a , 8'

   v 4

0 1 2 3 4 8

   a   NB. global a was changed too!

0 1 2 3 4 8


Also afflicted were in-place amend and in-place amend item.


This is only notable because it's the first time I've had to write actual
JE-like code, including


   p= !jt->local || *CAV(AAV(v[m+2])[1])!=CASGN || jtprobe(jt,
AAV(v[m+2])[0], jt->local);

   // OK if not in explicit, or not local assignment, or name defined


I feel so grown-up.


Henry



----------
From: *Roger Hui* <[email protected]>
Date: 1 May 2016 at 21:46
To: Henry Rich <[email protected]>
Cc: [email protected]


Minor comment:

p= !jt->local || *CAV(AAV(v[m+2])[1])!=CASGN || jtprobe(jt, AAV(v[m+2])[0],
jt->local);

​The intended convention is that if you have a function named
jtblah(jt,x,y) whose first argument is jt, then in ja.h you do

#define blah(x,y)  jtblah(jt,x,y)​

​and then everywhere you say blah(x,y,z) instead of jtblah(jt,x,y,z).

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

Reply via email to