![]() ![]() ![]() |
||
|
ColdFusion supports integers between -2,147,483,648 and 2,147,483,647 (32-bit signed integers). You can assign a value outside this range to a variable, but ColdFusion initially stores the number as a string. If you use it in an arithmetic expression, ColdFusion converts it into a floating point value, preserving its value, but losing precision as the following example shows:
<cfset mybignum=12345678901234567890> <cfset mybignumtimes10=(mybignum * 10)> <cfoutput>mybignum is: #mybignum#</cfoutput><br> <cfoutput>mybignumtimes10 is: #mybignumtimes10# </cfoutput><br>
This example generates the following output:
mybignum is: 12345678901234567890
mybignumtimes10 is: 1.23456789012E+020
|
||
![]() ![]() ![]() |