Do you understand the following?
sum =: +/
sum1=: +/"1
sum1 is defined to apply to the rank 1 cells of
the argument. Now:
foo=: 3 : 0
blah blah blah
)
foo1=: 3 : 0 " 1
blah blah blah
)
The pattern regarding rank is the same between
sum/sum1 and foo/foo1 . What is different is
that for (m : 0) , the lines of the object being
defined are taken from the following lines,
terminated by a ) on a line by itself. It may be
helpful to compare the above to the following:
sum=: +/
sumEach=: +/&.>
foo=: 3 : 0
blah blah blah
)
fooEach=: 3 : 0 &.>
blah blah blah
)
----- Original Message -----
From: Fred Bone <[EMAIL PROTECTED]>
Date: Monday, August 14, 2006 9:45 am
Subject: [Jgeneral] RE: [Jbeta] Possible link error in Dictionary
> On 14 Aug 2006 at 12:19, Miller, Raul D said:
>
> > Fred Bone wrote:
> > > Yes; perhaps I wasn't clear. I was talking not about
> > > applying the verb with a given rank, but about defining
> > > it. I eventually remembered the syntax, for example:
> > > wossname =. 4 : 0 " 1 0
> > > I still can't find where this is documented.
> >
> > J syntax is documented in appendix E of the dictionary
> > ("Parsing and Execution").
> >
> > For example, wossname =. 4 : 0 " 1 0 has the syntax
> > mark name asgn noun conj noun conj noun
> >
> > To parse this by the rules of appendix E, you would
> > take the above sentence and use it to populate the
> > parsing queue, and you'd start with an empty stack.
> > Then, you'd shift values from the queue to the stack
> > until the queue looks like
> > mark name
> > and the stack looks like
> > asgn noun conj noun conj noun
> >
> > From appendix E, the first rule that triggers on
> > this sentence is rule 4 (Conj), which executes
> > 4 : 0, and produces a dyad. Once this has happened,
> > the derived sentence has the syntax
> > mark name asgn verb conj noun
> >
> > Again, rule 4 triggers, but this time the conjunction
> > is " and the noun is 1 0, and the derived syntax is
> > mark name asgn verb
> >
> > Finally, rule 7 (Is) triggers, and execution of the
> > sentence is completed.
>
> Well, yes. But on that argument almost all of the Dictionary is
> redundant.
>
> And I still don't see how you can tell from just the parsing rules
> that
> the rank will become the default rank for the verb whose
> definition is in
> the following lines. Let alone that this is the way to go about it.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm