In case you're still having trouble seeing, what Joey wrote was "comma dot
zz", that is "ravel items".

To answer your more general question about why "aa 1" gives an error, a
simple answer is that you can't put two nouns next to each other without an
intervening verb.  E.g.
   'a b'=. 1 22
   a b
|syntax error
| a b
   a,b
1 2

What is perhaps confusing in this context is that an expression like
   1 2
is _not_ two nouns but a single noun.


On 4/21/08, Joey K Tuttle <[EMAIL PROTECTED]> wrote:
>
> Not to second guess Roger! But I think what you really want is:
>
>   ,.zz
>
>
>
> On Apr 21, 2008, at 17:58, Roger Hui <[EMAIL PROTECTED]> wrote:
>
> You are assuming that if x is equal to y then you can
> > substitute x for y in all contexts.  This assumption is not correct.
> > J is not unique in this regard.  For example, in C:
> >
> > #define PLUS +
> > ++ a;
> > +PLUS a;
> >
> > The last two lines are not equivalent.
> >
> > Anyway, the interpretation of the line
> >  aa 1 $ zz
> > is specified in the dictionary, in the descriptions on word formation
> > and in the page http://www.jsoftware.com/help/dictionary/dicte.htm .
> >
> > Perhaps what you you really want is   (aa,1)$zz ?
> >
> >
> >
> > ----- Original Message -----
> > From: "Hahn, Harvey" <[EMAIL PROTECTED]>
> > Date: Monday, April 21, 2008 17:35
> > Subject: [Jprogramming] Beg Q--reshape?
> > To: Programming forum <[email protected]>
> >
> > My brain must be fried at the end of the work day:
> > >
> > >     zz=. 1 2 3 4 5
> > >     5 1 $ zz
> > >  1
> > >  2
> > >  3
> > >  4
> > >  5
> > >     ]aa=. $zz
> > >  5
> > >     aa 1 $ zz
> > >  |syntax error
> > >  |       aa 1$zz
> > >
> > > Why won't shape (reshape) accept named numeric arguments?
> > > I see nothing
> > > in the Dictionary that prohibits this, but maybe I can't see so well
> > > today. ;)  Thanks in advance!
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to