largest()
Table of Contents
Overview
The largest() function takes numberList as an argument, and returns the largest number from the list.
Return Type
- Decimal
Syntax
<variable> = <numberList>.largest();
(OR)
<variable> = largest(<numberList> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned value. | DECIMAL |
<numberList> | The list from which the largest value will be returned. Numerical values can be specified in double quotes. | NUMBER LIST or DECIMAL LIST |
Examples
numberList = {1, 5, 2, 3};
largestValue= numberList.largest(); // returns 5
largestValue= numberList.largest(); // returns 5