MAX function
Purpose: MAX compares two floating point values and returns the largest one. By default MAX takes doubles as arguments and returns doubles as function results. TO use the MAX function with single floating point and integers, an intermediate variable must be used.
Syntax: RetVal# = MAX(Value1, Value2) Parameters:
Return Value:
|
Example 1:
PRINT MAX(2.1, 3.2)
Result:
3.2
Example 2:
DIM RetVal#
RetVal# = MAX(2.1, 3.2)
PRINT RetVal#
Result:
3.2
TO use the MAX function with single floating point and integers an intermediate variable must be used. For example, for single floating point maximum value use
DIM a!, b!, c! a! = 2.1 b! = 3.2 c! = MAX(a!, b!) PRINT c!