The following may be helpful:  Arrays that "look" the same may not be the
same.  For example, the following arrays all "look" the same but all differ
from each other:

123
,123
'123'
1 1$123
1 1 1 1$123
1 3$'123'
1 1 1 3$'123'
'123    '

If you stand behind the shoulders of an J/APL programmer debugging at the
computer, I expect you'll see her entering, lots of times,

   $ blah

and sometimes 3!:0 blah:

   3!:0 ]123
4
   3!:0 ]'abc'
2

= is defined in terms of -: (match), and arrays match if their values are
the same AND their shapes are the same.  Values AND shape.




On Sun, Jan 19, 2014 at 2:06 PM, Joe Bogner <joebog...@gmail.com> wrote:

> That worked. Thank you very much for the reply. I am relieved.
>
> I don't understand it though and I can't recall seeing it covered
> anywhere. If anyone can share a reference or can explain why it
> applies in the case of my ll example but not the case of (<'=') i.
> ('=';'=';'=.';'=.')  that would be great
>
> Here's the closest I came to understanding it:
>
> From the wikipedia article on rank
>
> Nouns, in J, are arrays. The rank of a noun is the number of
> dimensions of that array. The derived verb #@$ determines the rank of
> a noun.
>
> Using that to look at each, I can see that they are different
>
> ]ll
>
> ┌─┬─┬──┬──┐
> │=│=│=.│=.│
> └─┴─┴──┴──┘
>
> #@$ each ('=';'=';'=.';'=.')
>
> ┌─┬─┬─┬─┐
> │0│0│1│1│
> └─┴─┴─┴─┘
>
> #@$ each ll
>
> ┌─┬─┬─┬─┐
> │1│1│1│1│
> └─┴─┴─┴─┘
>
>
> http://en.wikipedia.org/wiki/Rank_(J_programming_language)
>
> On Sun, Jan 19, 2014 at 4:48 PM, Henry Rich <henryhr...@nc.rr.com> wrote:
> > It's the ranks of the strings.
> >
> > Try
> >
> > (<,'=') i. ll
> >
> > Henry Rich
> >
> >
> >
> > On 1/19/2014 4:39 PM, Joe Bogner wrote:
> >>
> >> Apologies for the trivial question. I've been banging my head against
> >> the table for 45 minutes on it. I have a list of strings that aren't
> >> behaving like they should. They were grabbed from a larger table
> >>
> >> It's not matching on i. with a boxed string
> >>
> >> ll
> >>
> >> ┌─┬─┬──┬──┐
> >> │=│=│=.│=.│
> >> └─┴─┴──┴──┘
> >>
> >> (<'=') i. ll
> >>
> >> 1 1 1 1
> >>
> >> I can't figure out why that's not working
> >>
> >> It works if I do it manually (<'=') i. ('=';'=';'=.';'=.')
> >>
> >> 0 0 1 1
> >>
> >> It doesn't look like there are any special characters in there:
> >>
> >>     $ each ll
> >>
> >> ┌─┬─┬─┬─┐
> >> │1│1│2│2│
> >> └─┴─┴─┴─┘
> >>
> >> $ ll
> >> 4
> >>
> >> a. i. "1 > ll
> >> 61 32
> >> 61 32
> >> 61 46
> >> 61 46
> >>
> >>
> >> ll was grabbed from ll=: 0}"1 m
> >>
> >> What am I missing that I'm sure is elementary? Something that is
> >> special about ll which is different than my fake data test?
> >>
> >> Thanks
> >> ----------------------------------------------------------------------
> >> 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to