The Cfscript Language; Statements - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 20: Extending ColdFusion Pages with CFML Scripting
for
break
continue
for-in
switch-case
For more information
The following JavaScript references may be useful in understanding the concepts and
control flow statements in CFScript:
Netscape's JavaScript Guide
Netscape's JavaScript Reference
David Flanagan's JavaScript: The Definitive Guide, published by O'Reilly &
Associates, 1996, 1998, http://www.oreilly.com.

The CFScript Language

This section explains the syntax of the CFScript language.

Statements

Note that in CFScript, semicolons define the end of a statement. Line breaks in your
source are insignificant. You can enclose multiple statements in curly braces:
{ statement ; statement ; statement ; }
The following statements are supported in CFScript:
Assignment: lval = expr ;
Note that lval can be a simple variable, an array reference, or a member of a structure.
x = "positive"; /y = x; a[3]=5;/ structure.member=10;
CFML expression: expr ;
StructInsert(employee,"lastname",FORM.lastname);
For more information on ColdFusion expressions see the CFML Language Reference .
if-else: if(expr) statement [else statement] ;
if(score GT 1)
result = "positive";
else
result = "negative";
339

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents