min

Determines the lesser of two numbers.

min(number1, number2) → returns numeric

Argument Reference

number1 numeric
Required

number2 numeric
Required

Examples
Sample code invoking the min function

<cfset myNum1 = 4 /> 
<cfset myNum2 = 9 /> 
<cfoutput>The minimum of #myNum1# and #myNum2# numbers is #min(myNum1, myNum2)#.</cfoutput>

Expected Result: The minimum of 4 and 9 is 4.

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub