House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home /  Groups /  ColdFusion Talk (CF-Talk)

Adding decimals

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Giesenhagen
05/21/2003 01:27 AM

This is weak... but it is late ... hopefully some of you are still online: <cfset variables.grossWeight = variables.totalShipWeight + .5> It doesn't like the .5  How would you write that to add those two together?   (variables.totalShipWeight is a number). Thanks in advance! Paul Giesenhagen QuillDesign

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Charlie Griefer
05/21/2003 01:44 AM

I think I remember seeing a similar problem...IIRC, the resolution was to use 0.5 instead of .5 Hope that's right.  I'm old and my mind is feeble :) charlie This is weak... but it is late ... hopefully some of you are still online: <cfset variables.grossWeight = variables.totalShipWeight + .5> It doesn't like the .5  How would you write that to add those two together? (variables.totalShipWeight is a number). Thanks in advance! Paul Giesenhagen QuillDesign

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Howie Hamlin
05/21/2003 01:49 AM

Try: <cfset variables.grossWeight = variables.totalShipWeight + 0.5> Regards, -- Howie Hamlin - inFusion Project Manager On-Line Data Solutions, Inc. - www.CoolFusion.com inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server ((())) PrismAV is Coming ((())) ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Philip Arnold
05/21/2003 04:19 AM

> This is weak... but it is late ... hopefully some of you are > still online: > > <cfset variables.grossWeight = variables.totalShipWeight + .5> > > It doesn't like the .5  How would you write that to add those > two together?  (variables.totalShipWeight is a number). As mentioned, adding a zero in front solves the problem - the reason is that without a starting number, CF believes it's looking at a Structure issue HTH to explain it


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists