Skip to content

sc_eq

Short-circuit equality (scalar context).

c = sc_eq(A, B)

Scalar-context short-circuit equality test. Returns a single boolean — does not produce an array even when inputs are arrays. Used by == in conditional expressions like if A == B. Companion to eq which returns the elementwise array.

sc_eq(3, 3) % true
  • eq — Element-wise equality test (function form of ==).
  • sc_ne — Short-circuit inequality (scalar context).