shouldnt numberformat('33.334','99') return 33.33?

tony

On 6/18/07, Mark Mandel <[EMAIL PROTECTED]> wrote:
> They all do similar, but quite different things, so I'm not sure where
> the confusion lies here?
>
> Round - rounds a number
> Ceiling - round UP a number
> NumberFormat - formats the display of the number, which is more than
> just rounding.
>
> Mark
>
> On 6/19/07, Tony <[EMAIL PROTECTED]> wrote:
> > (cross post from cf-comm.)
> >
> > you can either run this code below, on your server
> > or see it at this url.
> >
> > http://www.revolutionwebdesign.com/why/
> >
> > either way... if you can, help me understand this...
> >
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> >
> > <html>
> > <head>
> >         <title>Untitled</title>
> > </head>
> >
> > <body>
> >
> > <cfset request.valueOne = "7.76" />
> > <cfset request.valueTwo = "7.94" />
> > <cfset request.valueThree = "7.667" />
> > <cfset request.valueFour = "33.334" />
> >
> > I guess my real question is, why do we need round, ceiling and/or
> > numberformat functions, when they all return basically the same
> > values.
> > <BR>
> > I need to get the values that "DollarFormat()" provide, but its hard
> > to do math with $'s in the equations... hmmmm?
> > <BR>
> > I guess you could replace each $ in every value in EVERY calculation,
> > but that would be nasty wouldnt it?
> > <BR>
> > HELP :)
> > <BR>
> > (Note: One number is different and that is "ceilings" view of what
> > 33.334 should be.)
> >
> > <P>
> >
> > <cfoutput>
> >
> > Round: 7.76  = #round(request.valueOne)#
> > <BR>
> > Round: 7.94  = #round(request.valueTwo)#
> > <BR>
> > Round: 7.667  = #round(request.valueThree)#
> > <BR>
> > Round: 33.334  = #round(request.valueFour)#
> >
> > <P>
> >
> > Ceiling: 7.76  = #ceiling(request.valueOne)#
> > <BR>
> > Ceiling: 7.94  = #ceiling(request.valueTwo)#
> > <BR>
> > Ceiling: 7.667  = #ceiling(request.valueThree)#
> > <BR>
> > Ceiling: 33.334  = #ceiling(request.valueFour)#
> >
> >
> > <P>
> >
> > NumberFormat: 7.76  = #numberFormat(request.valueOne,'__')#
> > <BR>
> > NumberFormat: 7.94  = #numberFormat(request.valueTwo,'__')#
> > <BR>
> > NumberFormat: 7.557  = #numberFormat(request.valueThree,'__')#
> > <BR>
> > NumberFormat: 33.334  = #numberFormat(request.valueFour,'__')#
> >
> > <P>
> >
> > NumberFormat99: 7.76  = #numberFormat(request.valueOne,'99')#
> > <BR>
> > NumberFormat99: 7.94  = #numberFormat(request.valueTwo,'99')#
> > <BR>
> > NumberFormat99: 7.557  = #numberFormat(request.valueThree,'99')#
> > <BR>
> > NumberFormat99: 33.334  = #numberFormat(request.valueFour,'99')#
> >
> > <P>
> >
> > DollarFormat: 7.76  = #DollarFormat(request.valueOne)#
> > <BR>
> > DollarFormat: 7.94  = #DollarFormat(request.valueTwo)#
> > <BR>
> > DollarFormat: 7.557  = #DollarFormat(request.valueThree)#
> > <BR>
> > DollarFormat: 33.334  = #DollarFormat(request.valueFour)#
> > <P>
> > Attempt at an equation with $'s (#DollarFormat(request.valueFour)# +
> > #DollarFormat(request.valueThree)#): #DollarFormat(request.valueFour)
> > + DollarFormat(request.valueThree)#
> >
> > </cfoutput>
> >
> >
> > </body>
> > </html>
> >
> >
> > --
> > 'Never have anything in your life that you can't walk out on in thirty
> > seconds flat, if you spot the heat coming around the corner'
> >
> > robert deniro - heat (1995)
> >
> >
> > --
> > 'Never have anything in your life that you can't walk out on in thirty
> > seconds flat, if you spot the heat coming around the corner'
> >
> > robert deniro - heat (1995)
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281483
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to