Max

Description

Determines the larger of two numbers.

Syntax

Max ( x,  y )

Argument

Description

x

The number to which you want to compare y

y

The number to which you want to compare x


Return value

The datatype of x or y, whichever datatype is more precise. If any argument's value is null, Max returns null.

Usage

If either of the values being compared is null, Max returns null.

Examples

This statement returns 7:

Max(4,7)

This statement returns -4:

Max(- 4, - 7)

This statement returns 8.2, a decimal value:

Max(8.2, 4)

See also

Min

Max method for DataWindows in the section called “Max” in DataWindow Reference.