In this expression
lmin=lminflag & ~kmod & actminsub<nsm*pminu & actminsub>pminu;
is the & operator like a bitwise AND operator? lminflag and kmod are both arrays with either logical 1 or 0 as elements and lmin turns out to be either 1 or 0 as well.
Yes.
&is a per-element AND operator.&&is a scalar AND operator, with conditional execution of the remainder of the statement.For example, given:
Then:
However
It’s more interesting when the operands are functions, with side effects.