oneTrue(b);
The function returns true if exactly one element of a Boolean vector is true ('xor' of all elements).
The property is demonstrated with the following example calling the function as:
oneTrueElement = oneTrue( b )
simulation result |
function oneTrue extends Modelica.Icons.Function; input Boolean b[:] "Boolean vector"; output Boolean result "= true, if exactly one element of b is true"; end oneTrue;