anyTrueReturns true, if at least one element of the Boolean input vector is true ('or') |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
anyTrue(b);
Returns true if at least one element of the input Boolean vector b is true. Otherwise the function returns false. If b is an empty vector, i.e., size(b,1)=0, the function returns false.
Boolean b1[3] = {false, false, false}; Boolean b2[3] = {false, true, false}; Boolean r1, r2; algorithm r1 = anyTrue(b1); // r1 = false r2 = anyTrue(b2); // r2 = true
allTrue, andTrue, countTrue, enumerate, firstTrueIndex, index, and oneTrue.
b |
Type: Boolean[:] Description: Boolean vector |
---|
result |
Type: Boolean Description: = true, if at least one element of b is true |
---|