Max

 

Description

Finds the greater of two numbers.

Returns

Numeric

Category

Syntax

Max(number1, number2)
Max(number1, number2)
Max(number1, number2)

See also

Min

Parameters

Parameter

Description

number1, number2

Numbers

Example

<cfscript>
num1=-(-50);
num2=-50;
WriteOutput("The maximum of the two numbers is: " & Max(num1,num2));
</cfscript>
<cfscript> num1=-(-50); num2=-50; WriteOutput("The maximum of the two numbers is: " & Max(num1,num2)); </cfscript>
<cfscript>
       num1=-(-50);
       num2=-50;
       WriteOutput("The maximum of the two numbers is: " & Max(num1,num2));
</cfscript>

Output

The maximum of the two numbers is: 50

Get help faster and easier

New user?