Extensions.Quantities.Multiplication

From emotive
Revision as of 07:48, 2 October 2018 by Hb (talk | contribs) (→‎Properties)
Jump to navigation Jump to search

Classification

Name Multiplication
Short Description Multiplication of all numerical quantities
Class Operations
Extension OTX Quantities extension
Group Overloading semantics
Exceptions InvalidConversionException
Checker Rules -
Standard Compliant Yes

OTL Syntax

QuantityTerm = QuantityTerm1 * QuantityTerm2 * ...;

Description

This is a term which returns as a result of the product of all numerical quantities (NumericQuantity) in accordance with their units.

  • When Quantity values are multiplied or divided, a definition of the physical dimension of the resulting Quantity has to exist in the UNIT-SPEC available to the OTX system.
  • Scalar operands shall be interpreted "as is"; this allows e.g. the multiplication of 2 * 2 km which will result in a Quantity of 4000 m.
  • The display unit of the resulting Quantity should be set to the SI base unit corresponding to the physical dimension resulting from the operation. Furthermore, the display precision of the resulting Quantity shall be the maximum of the display precisions of the operands.

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 Product of two or more numeric quantity (NumericQuantity)

Properties

Name Data Type Class Default Cardinality Description
QuantityTerm1 Quantity Term - [1] NumericQuantity operand, which should be multiplied
QuantityTerm2 Quantityumeric]] Term - [1] NumericQuantity operand, which should be multiplied

OTL Examples

Quantities.Quantity Quantity;

/// Flow

Quantity = 2 * 2 [@Unit, "BL_DataLibraMIB.odx", "km", 2];

See also

Addition
Subtraction
Division
Modulo
Absolute Value
Negation