Extensions.Quantities.AbsoluteValue

From emotive
Jump to navigation Jump to search

Classification

Name AbsoluteValue
Short Description Returns the value of the numeric quantity without regard to its sign
Class Operations
Extension OTX Quantities extension
Group Overloading semantics
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

QuantityVariable = |QuantityTerm|;

Description

When the absolute value 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 (this is equal to -10 °C)


Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Quantity The result of the absolute value of a numeric quantity (NumericQuantity)

Properties

Name Data Type Class Default Cardinality Description
QuantityTerm Quantity Term - [1] The numeric Quantity term whose absolute value shall be returned

OTL Examples

/// Local Declarations

Quantities.Quantity Quantity;

/// Flow

Quantity = |-10 [@Unit, "BL_DataLibraMIB.odx", "°C"]|;

See also

Addition
Subtraction
Multiplication
Division
Modulo
Negation