.Modelica_Requirements.LogicalFunctions.oneTrue

Information

Syntax

oneTrue(b);

Description

The function returns true if exactly one element of a Boolean vector is true ('xor' of all elements).

Example

The property is demonstrated with the following example calling the function as:

oneTrueElement = oneTrue( b )
simulation result

Interface

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;

Generated at 2024-04-25T18:15:59Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos