Bo, Amend is an adverb that can take either a noun or a verb as its immediate argument. The reason the first example fails is that when 0 1 is used, amend takes the 0 and the 1 as its argument, not just the intended 1, because the parser does not know to separate out the two numbers. But when 1: is the supplied, because it is a verb and 0 is not, the correct result is obtained.
On Mon, Jan 20, 2014 at 2:02 AM, Bo Jacoby <bojac...@yahoo.dk> wrote: > > Thanks for the http://www.jsoftware.com/jwiki/Vocabulary/zeroco . I have > trouble in understanding the example > > 0 1} i.6 NB. Try to amend 1{i.6 to zero |rank error | 0 1}i.6 > 0 1:} i.6 0 0 2 3 4 5 > Is there a typo in the comment? ('{' versus '}') > > I thought that 0 1:} is a fork, but is is not: > > > (0 1: }) i.6 > |syntax error > | ( 0 1:})i.6 > > Is it a hook? > 0 (1: }) i.6 > 0 0 2 3 4 5 > > > So I'm pretty confused. > Thanks, Bo. > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm