Data Types - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
The CFML Programming Language
Constants
The value of a constant does not change during program execution. Constants are simple scalar values that you can use
within expressions and functions, such as "Robert Trent Jones" and 123.45. Constants can be integers, real numbers,
time and date values, Boolean values, or text strings. ColdFusion does not allow you to give names to constants.
Variables
Variables are the most frequently used operands in ColdFusion expressions. Variable values can be set and reset, and
can be passed as attributes to CFML tags. Variables can be passed as parameters to functions, and can replace most
constants.
ColdFusion has several built-in variables that provide information about the server and ColdFusion tags return. For a
list of the ColdFusion built-in variables, see Reserved Words and Variables in the CFML Reference.
The following two characteristics classify a variable:
• The scope of the variable, which indicates where the information is available and how long the variable persists
• The data type of the variable value, which indicates the type of information a variable represents, such as number,
string, or date
See
"Data
types" on page 32 for a list of data types (which also apply to constant values). For detailed information on
ColdFusion variables, including data types, scopes, and their use, see
Expressions
ColdFusion expressions consist of operands and operators. Operands are constants and variables, such as "Hello" or
MyVariable. Operators, such as the string concatenation operator (&) or the division operator (/) are the verbs that act
on the operands. ColdFusion functions also act as operators.
The simplest expression consists of a single operand with no operators. Complex expressions consist of multiple
operands and operators. For example, the following statements are all ColdFusion expressions:
12
MyVariable
(1 + 1)/2
"father" & "Mother"
Form.divisor/Form.dividend
Round(3.14159)
For detailed information on using variables, see
on expressions and operators, see

Data types

ColdFusion is considered typeless because you do not explicitly specify variable data types.
However, ColdFusion data, the constants and the data that variables represent, do have data types, which correspond
to the ways the data is stored on the computer.
ColdFusion data belongs to the following type categories:
"Using ColdFusion
"Using Expressions and Number
Last updated 1/20/2012
"Using ColdFusion
Variables" on page 38.
Variables" on page 38. For detailed information
Signs" on page 64.
32

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents