System Functions
MAX( ) Return Maximum Value
   
Format MAX (compare1,compare2,...[,ERR=stmtref])
 
Where:
compare1, compare2, ... Comma-separated list of values and/or expressions to be compared in order to determine the highest value.
stmtref Program line number or statement label to which to transfer control.
   
Returns The largest numeric or string value from the list of supplied values.
   
Description The MAX( ) function evaluates and returns the maximum (largest) value of the values or expressions specified. There is no limit to the number of values or expressions that can be passed to the MAX( ) function.

All compare values must be the same type -- numeric or string.

Using the MAX function on string values is +PxPlus Exclusive (build 9181)

   
See Also MIN( ) Return Minimum Value
   
Examples In this example, MAX( ) evaluates an expression (12*3.7=44.4), a literal (44.8)
and a variable (evaluated, A=43.2):
 
0050 LET A=13.21*3.27
0060 LET B=MAX(12*3.7,44.8,A)
0070 PRINT B
->run
44.8