Error getting tags :
error 404Error getting tags :
error 404 max | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
max
Basics
Expander triangle
Type
Function
Syntax
max(numbersList)
Introduced
1.0
Changed
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the largest number from a list of numbers.
Examples

max(17,34,8,1) -- returns 34
put max(returnedValues) into upperLimit

Additional Comments
Expander triangle

Use the max function to find the highest value in a set of values.

Parameters:

The numbersList is a comma-separated list of numbers, or an expression that evaluates to such a list, or an array containing only numbers.

Value:

The max function returns a number.

Comments:

You can use the max and min functions together to limit a value to a certain range. For example, the expression

max(10,min(myValue,100))

yields a number between 10 and 100. If myValue is within the limits, the expression is equal to myValue; if it is greater than 100, the expression evaluates to 100; and if it is less than 10, the expression evaluates to 10.

If the numbersList is empty, the max function returns zero.

Changes to Revolution:

The ability to use an array was introduced in version 1.1. In previous versions, only lists of numbers could be used with the max function.

User Comments
Expander triangle