But it's not quite the same. Consider: (,.4 0) ];.0 'abcd'
(,.4 1) ];.0 'abcd' |index error | (,.4 1) ];.0'abcd' (,.3 2) ];.0 'abcd' d (,.2 3) ];.0 'abcd' cd It seems to be OK for the interval to extend past the array - the interval is truncated. And, it seems to be OK for the interval to start just after the end of the array - 4 0 gives no error. But when both of those things happen at the same time, an error is signaled. That is untidy. I can see that 5 0 or 5 1 should fail, but it seems to me that 4,x should produce an empty interval. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Roger Hui > Sent: Friday, November 23, 2007 1:57 PM > To: Programming forum > Subject: Re: [Jprogramming] End-condition error in ];.0 > > It's an index error the same reason that 9999999{'****' > is an index error. > > In prehistoric times (Dictionary APL, 1987) Ken had > thought that i{y should be equivalent to ((#y)|i){y . > We talked him out of it. > > > > ----- Original Message ----- > From: Henry Rich <[EMAIL PROTECTED]> > Date: Friday, November 23, 2007 8:22 > Subject: [Jprogramming] End-condition error in ];.0 > To: 'Programming forum' <[email protected]> > > > (,:2 4) ];.0 (4#'*') > > ** > > (,:3 4) ];.0 (4#'*') > > * > > (,:4 4) ];.0 (4#'*') > > |index error > > | (,:4 4) ];.0(4#'*') > > > > Wouldn't it be better for that last to return an empty > > string? > > > > Fails in 6.01beta and 6.02beta > > > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
