Adobe COLDFUSION 9 Manual page 116

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
The CFML Programming Language
Tag
cfthread
cfthrow
cftrace
cftransaction
cftry
Example
The following example loops through a query in CFScript:
...
<cfscript>
// Loop through the qGetEmails RecordSet
for (x = 1; x <= qGetEmails.RecordCount; x=x+1) {
This_id = qGetEmails.Emails_id[x];
This_Subject = qGetEmails.Subject[x];
This_RecFrom = qGetEmails.RecFrom[x];
This_SentTo = qGetEmails.SentTo[x];
This_dReceived = qGetEmails.dReceived[x];
This_Body = qGetEmails.Body[x];
... // More code goes here.
}
</cfscript>
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:
break
case
catch
try
continue
default
Script functions
For a list of script functions, see
The CFScript language
The CFScript language syntax is similar to other scripting languages, and has the same types of elements.
Identifying CFScript
You enclose CFScript regions inside
region. The following lines show a minimal script:
cfscript
CFScript equivalent
thread
throw
trace
transaction
try
do
else
finally
for
function
if
"Script Functions added in ColdFusion
and
<cfscript>
</cfscript>
Last updated 8/5/2010
import
in
interface
pageencoding
return
switch
9" on page 109.
tags. No other CFML tags are allowed inside a
var
while
111

Advertisement

Table of Contents
loading

Table of Contents