Understanding Conditional Processing - MACROMEDIA COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

Nonsupported
logical operator
>=
< >
Arithmetic operators
The following table lists the arithmetic operators that ColdFusion supports:
Operators
+, -, *, /
+, -
Mod
\
^
String operator
The following table describes the one ColdFusion string operator that is a concatenation
operator:
Operator
&

Understanding conditional processing

To this point, all the coding examples shown are considered linear coding examples. Linear code is
when ColdFusion executes code starting with the first line on the page, and processes every line in
order. Although you will use linear code in your applications, you will often write code that
performs various actions based on conditions, such as the following:
Determine if a user entered a value in a form field.
Display results based on user input.
Display messages based on the time of day.
26
Chapter 2: CFML Basics
Equivalent ColdFusion
decision operator
GTE,
GREATER THAN OR EQUAL TO
IS NOT, NEQ,
NOT EQUAL
CONTAINS
DOES NOT CONTAIN
Description
The basic arithmetic operators: addition, subtraction, multiplication, and division.
In the case of division, the right operand cannot be zero.
Unary arithmetic operators for setting the sign of a number either positive or
negative (+ or -).
Returns the remainder (modulus) after a number is divided by a divisor. The result
has the same sign as the divisor. The right operand cannot be zero; for example:
11 MOD 4 is 3.
Divides two integer values. Use the \ (trailing slash) to separate the integers. The
right operand cannot be zero; for example: 9 \ 4 is 2.
Returns the result of a number raised to a power (exponent). Use the ^ (caret) to
separate the number from the power. The left operand cannot be zero; for
example: 2 ^ 3 is 8.
Description
Concatenates strings.
Description
Tests for greater than or equal to
Tests for nonequality.
Tests whether a value is contained within a
second value.
Tests whether a value is not contained
within a second value.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION MX and is the answer not in the manual?

This manual is also suitable for:

Coldfusion mx

Table of Contents