> That said, I do not understand the first result you 
> demonstrate.  I would
> have expected it to produce a domain error:
>    3(2&^)3
> 1.15792e77

x m&^ y is equivalent to m&^^:x y . The extension
was made in J4.06 in May 2001.
http://www.jsoftware.com/help/dictionary/d630n.htm
http://www.jsoftware.com/help/release/bond.htm

   3 (2&^) 3
1.15792e77
   2&^^:3 ]3
1.15792e77

   3 (2&^) 1.5
137.472
   2&^^:3] 1.5
137.472



----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Monday, July 16, 2007 3:57
Subject: Re: [Jprogramming] parser rules
To: Programming forum <[email protected]>

> On 7/16/07, adam dunne <[EMAIL PROTECTED]> wrote:
> > See the following:f=:2&^~
> >   f
> > ┌───────┬─┐
> > │┌─┬─┬─┐│~│
> > ││2│&│^││ │
> > │└─┴─┴─┘│ │
> > └───────┴─┘
> >   f 3
> > 1.15792e77
> >   g=:2&(^~)
> >   g
> > ┌─┬─┬─────┐
> > │2│&│┌─┬─┐│
> > │ │ ││^│~││
> > │ │ │└─┴─┘│
> > └─┴─┴─────┘
> >   g 3
> > 9
> > As you can see, the parser does the adverb before the conjunction,
> > with no parenthesis, in the first case.
> 
> The thing the parser does first winds up in the inner boxes.
> 
> It looks to me as if the conjunction is nested deeper than the
> adverb.
> 
> These are the same:
>    (2&^)~
>    2&^~
> 
> That said, I do not understand the first result you 
> demonstrate.  I would
> have expected it to produce a domain error:
>    3(2&^)3
> 1.15792e77
> 
> But the second winds up being equivalent to
>    (^&2)3
> or
>    3^2

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to