You're right. And the original error was correctly a domain error. What I was hoping to avoid was people locking into the framing problem as I did which the execution never got that far because of the domain error. The problem with the expression as shown has the possibility of a framing error, which I have run into so often before and got suckered into worrying about. After thinking about it more I would suggest the following:
Section 1: dissect '>:&> 1;''a'';3' This gives the same result as using (@), then in Section 2: dissect '>:&:> 1;''a'';3' to illustrate the framing error. It really illustrates the differences on how (&) and (&:) treat passing results between the two verbs as well as illustrating how the errors are displayed. I think it is neat how it shows the error in the middle with the (>:) below the error message. On Tue, Mar 10, 2015 at 10:35 AM, Henry Rich <[email protected]> wrote: > No; there is not and cannot ever be a framing error in u&.> because each > box of y is separately opened, operated on, and then enclosed, so that what > is assembled into the final result is always boxes, which are compatible. > > >:&.> 1;'a';3 NB. error in >: > |domain error > | >:&.>1;'a';3 > > > #&.> 1;'a';3 NB. no error in # > +-+-+-+ > |1|1|1| > +-+-+-+ > > Henry Rich > > > On 3/10/2015 11:57 AM, Don Guinn wrote: > >> Chapter 4 Section 1 - Diagnosing Errors >> >> The error is reported as a domain error; however, that is incorrect. The >> actual error is a framing error in (>). But because the (@) bindes the >> (>:) >> to the (>) The framing error is hidden. I would suggest changing the >> (>:@>) >> to (>:&.>) to avoid the framing error giving an actual domain error. Kind >> of interesting in that it shows the first item in the result incremented. >> >> The full statement: >> dissect '>:&.> 1;''a'';3' >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> >> ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
