| CFML Reference
|
|
ColdFusion Functions
|
Round
Description
Rounds a number to the closest integer.
Category
Mathematical functions
Syntax
Round(number)
See also
Ceiling, Fix, Int
Parameters
| Parameter |
Description |
number
|
Number to round
|
Example <!--- 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>
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|