Core.Terms.Negate
Jump to navigation
Jump to search
Contents
Classification
Name | Negate |
Short Description | Returns the value of the operand with inverted sign |
Class | Term |
Extension | OTX Core library |
Group | Operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
NumericValue = Negate(NumericTerm);
Description
Round is a NumericTerm which returns the value of the operand with inverted sign.
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 the value of the operand with inverted sign. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Numeral | Integer, Float | Term | - | [1] | The numeric term that will be negated. |
OTL Examples
/// Local Declarations
Integer MyValue1 = 123456;
Float MyValue2 = -123.456;
Integer Result1;
Float Result2;
/// Flow
// Below expression should return 123456
Result1 = Negate(MyValue1);
// Below expression should return 123.456
Result2 = Negate(MyValue2);
// Below expression should return -5.5
Result2 = Negate(-1.25 * -4.4);
See also
Add
Subtract
Multiply
Divide
Modulo
AbsoluteValue
Round
Quantities Negation