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)
Categories
Related
Syntax
Int(number)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| number | Real number to round down to an integer. |
Returns
An integer,
as a string.
Example
<h3>Int Example</h3> Int returns the closest integer smaller than a number. Int(11.7) : <cfoutput>#Int(11.7)#</cfoutput> Int(-11.7) : <cfoutput>#Int(-11.7)#</cfoutput> Int(0) : <cfoutput>#Int(0)#</cfoutput>