| Contents > CFML Reference > ColdFusion Functions > Max |
|
|
|
|
||
Determines the greater of two numbers.
The greater of two numbers.
Max(number1, number2)
Parameter |
Description |
|---|---|
number1, number2 |
Numbers |
<h3>Max 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 = "max.cfm">
<h3>Enter two numbers, see the maximum and minimum of them</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>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > Max |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa41.htm