Difference between revisions of "Core.Terms.RelationalOperations"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | ComparativeOperations | Basic logical operators for comparisons | Term | OTX Core library | Op...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | ComparativeOperations | Basic logical operators for comparisons | [[Term]] | [[Core|OTX Core library]] | [[Operations]] | - | - }} | {{ClassificationActivity | ComparativeOperations | Basic logical operators for comparisons | [[Term]] | [[Core|OTX Core library]] | [[Operations]] | - | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
BooleanValue = BooleanTerm1 operator BooleanTerm2 | BooleanValue = BooleanTerm1 operator BooleanTerm2 | ||
Line 33: | Line 33: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | Integer MyValue1; | |
− | + | Integer MyValue2; | |
− | + | Boolean result; | |
+ | |||
+ | result = MyValue1 != MyValue2; | ||
+ | result = MyValue1 == MyValue2; | ||
+ | result = MyValue1 >= MyValue2; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 03:56, 4 February 2015
Contents
Classification
Name | ComparativeOperations |
Short Description | Basic logical operators for comparisons |
Class | Term |
Extension | OTX Core library |
Group | Operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanValue = BooleanTerm1 operator BooleanTerm2
Description
Logical comparisons are used according to the C# notation for logical operations in the formulation of conditions etc. The following operators can be used:
- ==
- Equality, the expression evaluates to true , if both operands are equal.
- !=
- Inequality, the expression evaluates to true , if both operands are not equal.
- >
- Greater, the expression evaluates to true , if the left operand is greater than the right.
- >=
- Greater than or equal, the expression is true if the left operand is greater than or equal to the right.
- <
- Leaster, the expression evaluates to true , if the left operand is less than the right.
- <=
- Less equal, the expression is true if the left operand is less than or equal to the right.
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 | Return value from the logical operation |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
BooleanTerm1 | Boolean | Term | - | [1] | Left operand |
BooleanTerm2 | Boolean | Term | - | [1] | Right operand |
OTL Examples
Integer MyValue1;
Integer MyValue2;
Boolean result;
result = MyValue1 != MyValue2;
result = MyValue1 == MyValue2;
result = MyValue1 >= MyValue2;