Difference between revisions of "Extensions.Quantities.Addition"

From emotive
Jump to navigation Jump to search
Line 25: Line 25:
  
 
result = Quantity1 = 1 [@Unit, "ODX_RS_UNIT_LIB.odx", "km"] + 500 [@Unit, "ODX_RS_UNIT_LIB.odx", "m"];
 
result = Quantity1 = 1 [@Unit, "ODX_RS_UNIT_LIB.odx", "km"] + 500 [@Unit, "ODX_RS_UNIT_LIB.odx", "m"];
//Returns result = 1500 m
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 09:58, 10 February 2015

Classification

Name Addition
Short Description Sum 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, as a result the sum of all numerical quantities (NumericQuantity returns) with respect to their units.

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 Sum of all numerical quantities

Properties

Name Data Type Class Default Cardinality Description
QuantityTerm1 Quantity Term - [1] NumericQuantity operand to be summed
QuantityTerm2 Quantity Term - [1] NumericQuantity operand to be summed

OTL Examples

Quantities.Quantity result;

result = Quantity1 = 1 [@Unit, "ODX_RS_UNIT_LIB.odx", "km"] + 500 [@Unit, "ODX_RS_UNIT_LIB.odx", "m"];

See also

Subtraction
Multiplication
Division