Adobe COLDFUSION 9 Manual page 46

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
The CFML Programming Language
ColdFusion provides the following functions for identifying the data type of a variable:
• IsArray
• IsBinary
• IsBoolean
• IsImage
• IsNumericDate
• IsObject
• IsPDFObject
• IsQuery
• IsSimpleValue
• IsStruct
• IsXmlDoc
ColdFusion also includes the following functions for determining whether a string can be represented as or converted
to another data type:
• IsDate
• IsNumeric
• IsXML
ColdFusion does not use a null data type. However, if ColdFusion receives a null value from an external source such
as a database, a Java object, or some other mechanism, it maintains the null value until you use it as a simple value. At
that time, ColdFusion converts the null to an empty string (""). Also, you can use the JavaCast function in a call to a
Java object to convert a ColdFusion empty string to a Java null.
Numbers
ColdFusion supports integers and real numbers. You can intermix integers and real numbers in expressions; for
example, 1.2 + 3 evaluates to 4.2.
Integers
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
Last updated 8/5/2010
41

Advertisement

Table of Contents
loading

Table of Contents