Extensions.Quantities.Negation
Jump to navigation
Jump to search
Contents
Classification
Name | Negation |
Short Description | Returns the value of the numeric quantity with inverted sign |
Class | Operations |
Extension | OTX Quantities extension |
Group | Overloading semantics |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
QuantityVariable = Negate(QuantityTerm);
Description
When the negation is computed from a Quantity, the display unit of the resulting Quantity should be set to the SI base unit corresponding to the physical dimension of the original Quantity. Furthermore, the display precision of the resulting Quantity shall be equal to the display precision of the original Quantity. First the computation to SI Unit is done, and secondly the math function is calculated.
Example: -(-10°C) transform to SI -(263 K) Result: -263 K
Return Value
The Term returns the value, see table below.
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Quantity | The result of the negation of a numeric quantity (NumericQuantity) |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
QuantityTerm | Quantity | Term | - | [1] | The numeric Quantity term whose negation shall be returned |
OTL Examples
/// Local Declarations
Quantities.Quantity Quantity;
/// Flow
Quantity = Negate(-10 [@Unit, "BL_DataLibraMIB.odx", "°C"]);
See also
Conversions
Addition
Subtraction
Multiplication
Division
Modulo
Absolute Value
Relational Operations
Other Operations