Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need help with rounding up a number

Community Beginner ,
Jul 15, 2008 Jul 15, 2008
In my codes, there is a loop and when I cfdump the value, it looks like this:
2.0,.3.0,4.0, all the way to 32.0, etc
I need to use these number in a For Loop from="1" to="#ThisNumber#" but first I need to round it up so ThisNumber will come out as a whole number and not with the dot zero
Is there a function in CF that can do this? Please help!


TOPICS
Getting started
264
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 15, 2008 Jul 15, 2008
LATEST
alecken wrote:
> In my codes, there is a loop and when I cfdump the value, it looks like this:
> 2.0,.3.0,4.0, all the way to 32.0, etc
> I need to use these number in a For Loop from="1" to="#ThisNumber#" but first
> I need to round it up so ThisNumber will come out as a whole number and not
> with the dot zero
> Is there a function in CF that can do this? Please help!
>

A quick glance at the documentation for mathmetical functions turns up
int(), floor() and ceiling() depending on how you would like to round
different types of numbers.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources