Difference between revisions of "Core.Terms.Subtract"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''Subtract'''}}[[Category:Core]] | {{DISPLAYTITLE:OTX '''Subtract'''}}[[Category:Core]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | Subtract | Returns the numerical difference between the operands | [[Term]] | [[Core|OTX Core library]] | [[Operations]] | - | - }} | + | {{ClassificationActivity | Subtract | Returns the numerical difference between the two operands | [[Term]] | [[Core|OTX Core library]] | [[Operations]] | - | - }} |
== OTL Syntax == | == OTL Syntax == | ||
Line 11: | Line 11: | ||
Subtract is a NumericTerm which returns the numerical difference between the operands. The following operator can be used: '''-''' | Subtract is a NumericTerm which returns the numerical difference between the operands. The following operator can be used: '''-''' | ||
− | {{TermReturnValue| [[Integer]], [[Float]] | | + | {{TermReturnValue| [[Integer]], [[Float]] | The numerical difference between the operands. If one or more operands is of type float, the return value is float. Otherwise, the return value of the type is integer.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Numeral | [[Integer]], [[Float]] | [[Term]] | - | [1] | A numeric term which represents the minuend value | + | {{TableRowPropertie1| Numeral | [[Integer]], [[Float]] | [[Term]] | - | [1] | A numeric term which represents the minuend value}} |
{{TableRowPropertie2| Subtrahend | [[Integer]], [[Float]] | [[Term]] | - | [1] | A numeric term which represents the subtrahend value}} | {{TableRowPropertie2| Subtrahend | [[Integer]], [[Float]] | [[Term]] | - | [1] | A numeric term which represents the subtrahend value}} | ||
|} | |} |
Latest revision as of 07:18, 24 June 2019
Contents
Classification
Name | Subtract |
Short Description | Returns the numerical difference between the two operands |
Class | Term |
Extension | OTX Core library |
Group | Operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
NumericValue = NumericTerm1 - NumericTerm2;
Description
Subtract is a NumericTerm which returns the numerical difference between the operands. The following operator can be used: -
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Integer, Float | The numerical difference between the operands. If one or more operands is of type float, the return value is float. Otherwise, the return value of the type is integer. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Numeral | Integer, Float | Term | - | [1] | A numeric term which represents the minuend value |
Subtrahend | Integer, Float | Term | - | [1] | A numeric term which represents the subtrahend value |
OTL Examples
/// Local Declarations
Integer MyValue1 = 1;
Integer MyValue2 = 5;
Integer Result1;
Float Result2;
/// Flow
Result1 = MyValue1 - MyValue2;
Result2 = MyValue1 - 222.2222;
See also
Add
Quantities Subtraction
Multiply
Divide
Modulo
AbsoluteValue
Round
Negate