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