[thelist] Rounding up a number

Dean Mah dsmah at home.com
Tue Nov 21 22:42:55 CST 2000


If you are familiar with printf, try using sprintf.

I've run into a few cases where sprintf does not round properly.  In
that case, I write my own rounding function.

Dean


Adrian Fischer writes:

> I need to round a number up and make it available as a $variable in
> per?  I am dividing a number and it is the result that needs to
> rounded and made available.  I can printf() to make it print rounded
> but making the rounded number a variable is not happening for me.
> No doubt very simple but I cant seem to get a handle on it.




More information about the thelist mailing list