Pete Freitag Pete Freitag

Floor Function in ColdFusion is Int

Updated on December 07, 2020
By Pete Freitag

Those of you coming from programming languages that have a floor function, may be hard pressed to find it in ColdFusion - that's because it's called Int.

The Int function will take in a floating point number chop off the decimal part, leaving you with just the integer part.

For example:

#Int(5.2)# = 5
#Int(2.9)# = 2

Update: ColdFusion 2016+ and Lucee 5.1+ now implement the floor() function in CFML.

coldfusion floor functions int

Floor Function in ColdFusion is Int was first published on May 30, 2006.

If you like reading about coldfusion, floor, functions, or int then you might also like:

FuseGuard Web App Firewall for ColdFusion

The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.

The weekly newsletter for the CFML Community