Returns the smaller, value of two numbers.
Min(number1, number2)
Parameter |
Description |
---|---|
number1, number2 |
Any numbers. |
<!--- This example shows the Max and Min of two numbers ---> <html> <head> <title> Min Example </title> </head> <body bgcolor = silver> <H3>Min Example</H3> <cfif IsDefined("FORM.myNum1")> <cfif IsNumeric(FORM.myNum1) and IsNumeric(FORM.myNum2)> <P>The maximum of the two numbers is <cfoutput>#Max(FORM.myNum1, FORM.myNum2)#</cfoutput> <P>The minimum of the two numbers is <cfoutput>#Min(FORM.myNum1, FORM.myNum2)#</cfoutput> <cfelse> <P>Please enter two numbers </cfif> </cfif> <form action = "min.cfm" method = "POST"> <H3>Enter two numbers, and see the maximum and minimum of the two numbers</H3> Number 1 <input type = "Text" name = "MyNum1"> <BR>Number 2 <input type = "Text" name = "MyNum2"> <BR><input type = "Submit" name = "" value = "See results"> </FORM> </body> </html>