68
The = Function: Equal To
[J
Monadic (One-Argument) Form
There
is
no
monadic form.
Dyadic (Two-Argument) Form: Equal To A=B
The equal to function result
is
1 when the value of argument A equals the value
of argument
B;
otherwise, the result
is
O.
The arguments (numeric or character)
can be scalars, vectors, or other arrays. The arguments must be the same shape,
unless one of the arguments
is
a scalar or any single-element array. Arguments
of the
same
shape
have
the same shape result:
0::::5
()
1,65~321=1,65~321
1
1::::
I A I
o
.'
A
I::::
'B'
o
':1.
':::::1.
o
:I.
o
o 0
If
one argument
is
a scalar or a single-element array, the shape of the result
is
the
same
as
that of the other argument. The single element
is
applied to every element
of the multielement array.
'A':'ABACADAEAFAG'
101
0
101
0 1 0 1 0
Note:
If
the arguments are numeric, the result of the = function depends on the
OCT
system variable (see Chapter 5 for information on the
OCT
system variable).