Difference between revisions of "Core.Terms.LogicXor"
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''LogicXor'''}}Category:Core == Classification == {{ClassificationActivity | LogicXor | Represents the Boolean exclusive disjunction | Term | Cor...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
== Description == | == Description == | ||
− | + | LogicXor is a BooleanTerm which represents the Boolean exclusive disjunction. Returns '''true''' if and only if | |
+ | one of the two operands is '''true''', but not all. The following operator can be used: '''^^''' | ||
− | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | The returned Boolean value of the disjunction of the BooleanTerm operands }} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | The returned Boolean value of the exclusive disjunction of the BooleanTerm operands }} |
== Properties == | == Properties == | ||
Line 17: | Line 18: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| Terms | [[Boolean]] | [[Term]] | - | [2..*] | Represents the list of BooleanTerm operands of the disjunction. Terms shall be evaluated in the order of appearance in the OTX document.}} | + | {{TableRowPropertie2| Terms | [[Boolean]] | [[Term]] | - | [2..*] | Represents the list of BooleanTerm operands of the exclusive disjunction. Terms shall be evaluated in the order of appearance in the OTX document.}} |
|} | |} | ||
Line 27: | Line 28: | ||
Boolean result; | Boolean result; | ||
− | result = MyValueOfBool1 | + | result = MyValueOfBool1 ^^ MyValueOfBool2 ^^ false ^^ MyValueOfBool3; |
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[Core.Terms. | + | [[Core.Terms.LogicAnd|LogicAnd]] <br/> |
− | [[Core.Terms. | + | [[Core.Terms.LogicOr|LogicOr]] <br/> |
[[Core.Terms.LogicNot|LogicNot]] | [[Core.Terms.LogicNot|LogicNot]] |
Latest revision as of 10:24, 21 June 2019
Contents
Classification
Name | LogicXor |
Short Description | Represents the Boolean exclusive disjunction |
Class | Term |
Extension | OTX Core library |
Group | Operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanVariable = BooleanTerm1 ^^ BooleanTerm2;
Description
LogicXor is a BooleanTerm which represents the Boolean exclusive disjunction. Returns true if and only if one of the two operands is true, but not all. The following operator can be used: ^^
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | The returned Boolean value of the exclusive disjunction of the BooleanTerm operands |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Terms | Boolean | Term | - | [2..*] | Represents the list of BooleanTerm operands of the exclusive disjunction. Terms shall be evaluated in the order of appearance in the OTX document. |
OTL Examples
Boolean MyValueOfBool1 = true;
Boolean MyValueOfBool2 = false;
Boolean MyValueOfBool3 = true;
Boolean result;
result = MyValueOfBool1 ^^ MyValueOfBool2 ^^ false ^^ MyValueOfBool3;