MACROMEDIA COLDFUSION 5 - CFML Reference page 560

Cfml reference
Hide thumbs Also See for COLDFUSION 5 - CFML:
Table of Contents

Advertisement

542
Min
Description
Returns the smaller, value of two numbers.
Category
Date and time functions
Min(number1, number2)
Syntax
See also
Max
Parameters
Parameter
number1, number2
Example
<!--- 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>
<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>
<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>
Description
Any numbers.
Chapter 3 ColdFusion Functions

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 5

Table of Contents