Strings match only if they have the same shape and the same values.
(,'=') -: '='
0
but look:
(,'=') = '='
1
It's a totally different question. You are asking if the atoms match.
The answer is a list rather than a single boolean yes/no:
$ (,'=') = '='
1
Henry Rich
On 1/19/2014 5:06 PM, Joe Bogner 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