User Guide

Table Of Contents
34 Chapter 2: Elements of CFML
Expressions
ColdFusion expressions consist of operands and operators. Operands are comprised of 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 Chapter 3, “Using ColdFusion Variables,” on
page 43. For detailed information on expressions and operators, see Chapter 4, “Using
Expressions and Number Signs,” on page 75.
Client Variables that are associated with one client. Client variables let you maintain state
as a user moves from page to page in an application and are available across
browser sessions.
Session Variables that are associated with one client and persist only as long as the client
maintains a session.
Application Variables that are associated with one, named, application on a server. The
Application.cfc initialization code or the
cfapplication tag name attribute specifies
the application name.
Server Variables that are associated with the current ColdFusion server. This scope lets
you define variables that are available to all your ColdFusion pages, across multiple
applications.
Flash Variables sent by a Macromedia Flash movie to ColdFusion and returned by
ColdFusion to the movie.
Arguments Variables passed in a call to a user-defined function or ColdFusion component
method.
This Variables that are declared inside a ColdFusion component or in a
cffunction tag
that is not part of a ColdFusion component.
function local Variables that are declared in a user-defined function and exist only while the
function executes.
Scope Description