|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Adding decimals
Author: Philip Arnold
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24105#121295
> 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
Author: Howie Hamlin
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24105#121290
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 -----
Author: Charlie Griefer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24105#121289
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
Author: Paul Giesenhagen
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24105#121285
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
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||