Max Procedure

Version 7

Returns the greater value of two values.

Syntax

[ dMax = ] Max ( x, y )

The Max procedure syntax has the following parts:

 

Name

Type

Description

dMax

Double

Return value - the greater of two values

x

Val Double

First value

y

Val Double

Second value

Comments

You can pass variants of numeric values.

If you pass non-numeric values, either compile error or run-time error will ensue.

Example

 

print "-- Max(3, 1) => "; Max(3, 1)

print "-- Max(20.5, 10.9) => "; Max(20.5, 10.9)

vrA=40   ! vrA and vrB are two variant variables

vrB=60

print "-- Max(vrA, vrB) => "; Max(vrA, vrB)

 

 

! the following is the results of each print statement above:

-- Max(3, 1) => 3

-- Max(20.5, 10.9) => 20.5

-- Max(varA, varB) => 60

See Also

Min