|
Tag equivalents in CFScript
ExampleThe 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 wordsIn 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
|
do
|
import
|
var
|
case
|
else
|
in
|
while
|
catch
|
finally
|
interface
|
|
try
|
for
|
pageencoding
|
|
continue
|
function
|
return
|
|
default
|
if
|
switch
|
|
|
|
|