• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 9. other functions > Rounding Values with the Round Function

Rounding Values with the Round Function

When you find it necessary to round numbers in your application, you'll be happy to know you don't have to do it manually; ColdFusion provides the round function to standardize numbers to the closest integer (whole number).

When might you need to do this? Suppose your company has decided to change all their prices to whole-dollar amounts, so instead of $14.95 the price needs to be $15.00. With the database you have (or pretty much any other one, for that matter), it would be easy to go in and change the individual prices, but if you had thousands of items you might quickly come to think it wasn't so easy after all. By using Round you can implement a quick, short-term fix while the database is being updated.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint