Difference between revisions of "Core.Terms.MathematicalOperations"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | MathematicalOperations | Basic mathematical operators | Term | OTX Core library | Operations...") |
(No difference)
|
Revision as of 09:36, 13 August 2014
Contents
Classification
Name | MathematicalOperations |
Short Description | Basic mathematical operators |
Class | Term |
Extension | OTX Core library |
Group | Operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
NumericValue NumericTerm1 = operator NumericTerm2
NumericValue = - NumericTerm1
Description
Mathematical operators are used according to the C# notation for mathematical operations. The following operators can be used:
- +
- Plus, the result is the numerical sum of two or more operands.
- -
- Minus, the result is the numerical subtraction of the left and right operands.
- -
- Negation, the result is the negated value of the operands (E.g.: -1 or Variable1).
- *
- Multiplication, the result is the numerical multiplication of two or more operands.
- /
- Div, the result is the numerical division of the left and right operands.
- %
- Modulo, that is result of the remainder of the integer division of left and right operands (applies only to type Integer).
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
NumericValue | Return value of mathematical operation. One operand is of type float return value is float. Otherwise, the return value of the type is integer. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
NumericTerm1 | - | Term | - | [1] | Left operand |
NumericTerm2 | - | Term | - | [1] | Right operand |
Examples
* MyValue1 + MyValue2
* MyValue1% MyValue2
* MyValue1 / MyValue2