Difference between revisions of "Extensions.Util.Max"
Jump to navigation
Jump to search
(→Classification: Edited by Ngoc Tran.) |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | NumericTerm | + | NumericTerm Util.Max({NumericTerm[ ] numeral}); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 11: | Line 11: | ||
The OTX '''Max''' term is a NumericTerm which returns the '''Max''' of all its operands. | The OTX '''Max''' term is a NumericTerm which returns the '''Max''' of all its operands. | ||
− | {{ | + | {{Important|The actual return data type of the '''Max''' term depends on the data types of the operands: If one of the operands is Float, all Integer operands are automatically promoted to Float prior to the operation and the returned value is Float. Otherwise, the returned value is Integer.}} |
{{TermReturnValue| [[Numeric]] | The max of all its operands.}} | {{TermReturnValue| [[Numeric]] | The max of all its operands.}} | ||
Line 23: | Line 23: | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
Float Float1; | Float Float1; | ||
Latest revision as of 02:27, 17 February 2020
Contents
Classification
Name | Max |
Short Description | Gets the max of all operands. |
Class | Term |
Extension | OTX Util extension |
Group | Util related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
NumericTerm Util.Max({NumericTerm[ ] numeral});
Description
The OTX Max term is a NumericTerm which returns the Max of all its operands.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Numeric | The max of all its operands. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Numeral | Numeric | Term | - | [2..*] | The numeric operands of the Max Term. |
OTL Examples
/// Local Declarations
Float Float1;
/// Flow
Float1 = Util.Max({0.99, 0.97, 0.93, 0.91, 0.9});
See also
Compare
CopyByteField
GetRandomNumber
IsInitialized
ListIndexOf
ListIndexOfAny
ListReverse
ListSort
Min
StringFormat