An important verb for comparison is Match, the dyadic meaning of -:
(dash-colon.)

http://www.jsoftware.com/help/dictionary/d122.htm

It's the way to get a scalar boolean result (0 or 1) as the truth-value of
comparing two things in their entirety. If the two things match in all
regards, 1, if not, 0.

A simple example sentence:

   0 0 1 0 -: 1 0 1 0
0



On Tue, Jul 12, 2011 at 6:48 AM, David Vaughan <[email protected]
> wrote:

> What is the best approach to compare the contents of lists? What I want to
> do is the equivalent of:
>
> if (listA[i]!=listB[i])
>
> In C.
>
> Also I've been having trouble trying to count nonzero list items.
>
> Thanks.
>
> ___________________________
>
> David Vaughan
> ----------------------------------------------------------------------
> 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