NumberFormat() Rounding Up

2001-12-05 Thread Vinny DiDonato

Hello:

I have the NumberFormat() func rounding up a number.  The result is one
integer higher than the original integer.

Example:
NUMBERFORMAT(5111, '')

This yields 5112 on CF 4.5.
It's supposed to print 5111.

However, if the first number in the string is = 5, the last number is
always +1 (so the code above would yield 2).  
If the first number in the string is =4, the last number is always
correct (or 1 in the string above.).  If the first number = 9, the last
number is always -1 (so the code above would yield 0).

This happens on CF 4.5.  CF 5.0 does not have this issue, but our
commerce system is on 4.5.

Any help or logical explanation would be great, because this doesn't
make sense to me.

-Vinny DiDonato
AOL Handle = Vinny49
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CORRECTION: NumberFormat() Rounding Up

2001-12-05 Thread Zac Belado

 The first line should read:

 I have the NumberFormat() func formatting a number with zeros.  The
 result is one integer higher than the original integer.

I'm assuming its just a bug in Cf 4.5

Do you just need to pad put the string to a set number of characters? If so
then you might want to look at adding a series of zeroes manually.
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists