andTrue(b);
Returns true if all elements of the Boolean input vector b are true. Otherwise the function returns false. If b is an empty vector, i.e., size(b,1)=0, the function returns true (as opposed to allTrue returning false).
Boolean b1[3] = {true, true, true}; Boolean b2[3] = {false, true, false}; Boolean r1, r2; algorithm r1 = andTrue(b1); // r1 = true r2 = andTrue(b2); // r2 = false
allTrue, anyTrue, countTrue, enumerate, firstTrueIndex, index, and oneTrue.
function andTrue extends Modelica.Icons.Function; input Boolean b[:] "Boolean vector"; output Boolean result "= true, if all elements of b are true"; end andTrue;