View comments | RSS feed

Int

Description

Calculates the closest integer that is smaller than number. For example, it returns 3 for Int(3.3) and for Int(3.7); it returns -4 for Int(-3.3) and for Int(-3.7).

Returns

An integer, as a string.

Category

Mathematical functions

Function syntax

Int(number)

See also

Ceiling, Fix, Round

Parameters

Parameter Description

number

Real number to round down to an integer.

Example

<h3>Int Example</h3>
<p>Int returns the closest integer smaller than a number.

<p>Int(11.7) : <cfoutput>#Int(11.7)#</cfoutput>
<p>Int(-11.7) : <cfoutput>#Int(-11.7)#</cfoutput>
<p>Int(0) : <cfoutput>#Int(0)#</cfoutput>

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting

Version 7

Comments


barneyb said on May 11, 2005 at 1:08 PM :
This should say it returns the "largest integer less than or equal to a given number", which is subtly different than what currently is listed. It should also indicate that it is the CF alias of the 'floor' operation and that 'ceiling' is the complementary operation.
s_bywater said on Apr 13, 2006 at 7:39 AM :
Grrr I had added the same correction to the 6.1 version of this manual in LiveDocs. You guys should use our input to correct future version of the manual.

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct121.htm
ASandstrom said on Apr 28, 2006 at 9:16 AM :
WE do, in fact, use LiveDocs comments to update each version of the documentation. Occasionally one slips through the cracks. Sorry about that.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000511.htm