> Indexing with negative numbers is > another area that I, as one who has trouble > getting loop bounds correct the first time, > find troublesome.
I've never had a bug whereby I've accidentally made my index negative. Too large, yes. Always zero, yes. But, then, I don't write too many loops in J. Maybe that's the difference. In any case, I'd recommend you reconsider your position on negative indexing. It is quite useful, and it's an elegant, consistent extension. That's a great value, even if you have to pay for it with the occasional fencepost error. Here's a Jforum search for _1} . If you read through the results, you'll find some gems. http://www.jsoftware.com/cgi-bin/forumsearch.cgi?all=&exa=_1%7D&one=&exc=&add=&sub=&fid=&tim=0&rng=0&dbgn=1&mbgn=1&ybgn=1998&dend= 31&mend=12¥d=2007 Here's a good one from http://www.jsoftware.com/pipermail/programming/2007-October/008308.html : Alistair Tucker asked: > I meant to ask whether there might not be a better > way to .. curtail }: every dimension of an argument. Roger responded: > ([EMAIL PROTECTED] $ _1:) }. ] Now, that's not quite indexing, but it uses the same logic (index definitions). He could have just as easily written it {~ (<<_1) <@#~ [EMAIL PROTECTED] . In any event, the rest of that thread is worth reading, too. It has a number of other good examples. -Dan PS: I also disagree with your distaste for frame building. That would be a much longer post, though. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
