because dollarformat and numberformat are display function and you
wouldn't want to use them in calculations.  Ceiling and round are
different animals hence they return different values.  Ceiling <>
Round <> Floor

On 6/18/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)
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:236799
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
  • Re: cf why. Zaphod Beeblebrox

Reply via email to