Macromedia coldfusion 4.5-cfml language reference User Manual

Page of 608
508
CFML Language Reference 
Round
Rounds a number to the closest integer.
See also 
Ceiling
Fix,
 and 
Int
.
Syntax
Round(
number)
number
Number being rounded.
Examples
<!--- This example shows the use of Round --->
<HTML>
<HEAD>
<TITLE>
Round Example
</TITLE>
</HEAD>
<ODY>
<H3>Round Example</H3>
<P>This function rounds a number to the closest
integer.
<UL>
<LI>Round(7.49) : <CFOUTPUT>#Round(7.49)#</CFOUTPUT>
<LI>Round(7.5) : <CFOUTPUT>#Round(7.5)#</CFOUTPUT>
<LI>Round(-10.775) : <CFOUTPUT>#Round(-10.775)#</CFOUTPUT>
<LI>Round(1.2345*100)/100 : 
<CFOUTPUT>#Evaluate(Round(1.2345*100)/100)#</CFOUTPUT>
</UL>
</BODY>
</HTML>