|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Adding decimals
This is weak... but it is late ... hopefully some of you are still online:Paul Giesenhagen 05/21/03 01:27 A I think I remember seeing a similar problem...IIRC, the resolution was toCharlie Griefer 05/21/03 01:44 A Try:Howie Hamlin 05/21/03 01:49 A > This is weak... but it is late ... hopefully some of you arePhilip Arnold 05/21/03 04:19 A 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 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 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 ----- > 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
|
March 22, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||