Max(), Min()
These two functions take a list of values and return either the largest or smallest value in the list. Any of the numeric types (Numeric, Float, Integer, Currency, Double) can be used, as well as character, memo, date and datetime expressions. The result of numeric comparisons is Numeric unless all the values passed in are Currency, in which case the result is Currency. If Dates and Datetimes are mixed, Datetime is the result. All Memo and Character comparisons return type Character. General, Screen and Object variables yield an "Operator/operand type mismatch" or "Data type mismatch," as you might expect.
Usage |
nReturnValue = MAX( nExpr1, nExpr2 [, nExpr3 ... ] ) nReturnValue = MIN( nExpr1, nExpr2 [, nExpr3 ... ] ) |
Example |
?MAX(27,39,-203) && Returns 39 ?MIN(27,39,-203) && Returns -203 nHighValue=MAX(nUser1,nUser2,nUser3) |
See Also |