Expressions; Variables; Comments; Differences From Javascript - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

342
continue: skip to next loop iteration
for ( loop=1; loop LT 10; loop = loop+1)
{
if(a[loop]=0) continue;
a[loop]=1;
}
break: break out of the current switch statement or loop
for( ; ; )
{
indx=indx+1;
if(Find("key",strings[indx],1))
}

Expressions

CFScript supports all CFML expressions. CFML expressions include operators (such as
+, -, EQ, etc.) as well as all CFML functions.
See the CFML Language Reference for information about CFML operators and
functions.
Note

Variables

Variables can be of any ColdFusion type, such as numbers, strings, arrays, queries, and
COM objects. You can read and write variables within the script region.

Comments

Comments in CFScript blocks begin with two forward slashes (//) and end at the line
end. You can also enclose CFScript comments between /* and */. Note that you cannot
nest /* and */ inside other comment lines.

Differences from JavaScript

While CFScript is based on JavaScript, there are some key differences you'll want to
note:
CFScript uses ColdFusion expressions, which are neither a subset nor a
superset of JavaScript expressions. For example, there is no < operator in
CFScript.
No user-defined functions or variable declarations are available.
break;
You cannot use CFML tags in CFScript.
Developing Web Applications with ColdFusion

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents