For reasons I don't understand, 1 0 1 #^:_1!.a: 2;3 gives a domain error but
1 0 1&#^:_1!.a: 2;3 +-++-+ |2||3| +-++-+ works. You need the & . (It's always worked like this). So you could define pand =: 1 : 'm&#^:_1!.a:' 1 0 1 pand 2;3 +-++-+ |2||3| +-++-+ Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of bill lam > Sent: Thursday, November 02, 2006 11:34 AM > To: Programming forum > Subject: Re: [Jprogramming] Boxing according to a Pattern > > Leigh J. Halliwell wrote: > > > (i.0) (4 : '(,y~:0) expand x<;.1~;y{. each 1') 0 0 0 > > 0 0 0 > > > > I would like it in this case to be three empty boxes. Can > I make the expand > > operator fill with empty boxes? > > > First I found any nonempty left argument will give 3 empty boxes. > btw, would it be more intuitive if swap left and right arguments. > > ('a') (4 : '(,y~:0) expand x<;.1~;y{. each 1') 0 0 0 > > and #^:_1 seems do not like fit conjunction. > 1 1j2 1 #!.9 [4 5 6 > 4 5 9 9 6 > 1 1 0 0 1 (#!.9)^:_1 [4 5 6 > |domain error > | 1 1 0 0 1 #(!.9)^:_1[4 5 6 > 1 1 0 0 1 (#^:_1)(!.9) [4 5 6 > |domain error > | 1 1 0 0 1 (#^:_1)(!.9)[4 5 6 > > could anyone suggest a phrase to convert left argument to > #^:_1 to the format > required by # so that there will be a workaround to #^:_1 ? > 1 1 0 0 1 => 1 1j2 1 > > -- > regards, > bill > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
