248
Chapter 13 Extending ColdFusion Pages with CFML Scripting
continue:
skip to next loop iteration
for ( loop=1; loop LT 10; loop = loop+1)
{
if(a[loop] EQ 0) continue;
a[loop]=1;
}
break:
break out of the current switch statement or loop
indx = 0;
for( ; ; )
{
indx=indx+1;
if(Find("key",strings[indx],1))
break;
}
return
,
var
: See “Defining and Using Custom Functions” on page 250
Reserved words
In addition to the names of ColdFusion functions and words reserved by ColdFusion
expressions (such as NOT, AND, IS, and so on), the following words are reserved in
CFScript. Do not use these words as variables or identifiers in your scripting code:
Differences from JavaScript
CFScript is similar to JavaScript, however, there are some key differences in CFScript:
•
It uses ColdFusion expressions, which are neither a subset nor a superset of
JavaScript expressions. For example, there is no < operator in CFScript.
•
It does not have user-defined variable declarations.
•
It is case-insensitive.
•
All statements end in a semicolon, and line breaks in the code are ignored.
•
Assignments are statements, not expressions.
•
Some implicit objects are not available, such as Window and Document.
Note
CFScript is not directly exportable to JavaScript. Only a limited subset of JavaScript
can run inside CFScript.
for
while
do
if
else
switch
case
break
default
in
continue
function
var
return
Summary of Contents for COLDFUSION 5-DEVELOPING
Page 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Page 58: ...38 Chapter 3 Querying a Database ...
Page 134: ...114 Chapter 7 Updating Your Database ...
Page 210: ...190 Chapter 10 Reusing Code ...
Page 232: ...212 Chapter 11 Preventing and Handling Errors ...
Page 238: ...218 Chapter 12 Using the Application Framework ...
Page 262: ...242 Chapter 12 Using the Application Framework ...
Page 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Page 320: ...300 Chapter 15 Indexing and Searching Data ...
Page 336: ...316 Chapter 16 Sending and Receiving E mail ...
Page 374: ...354 Chapter 18 Interacting with Remote Servers ...