House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

CFScript

CFSCRIPT: Basics

1The CFSCRIPT tag
1.1 CFSCRIPT is a ColdFusion block tag that accepts no attributes. All operations take place between the beginning and end CFSCRIPT tag (i.e. in the tag body).
<CFSCRIPT>
     operations
</CFSCRIPT>
1.2A CFSCRIPT block can not be empty. It must contain at least one operation.
1.3A CFSCRIPT block can not use CF tags within its body.
1.4The body of a CFSCRIPT tag is an evaluation zone. This means that ALL 'words*' that are not reserve words, quoted strings or numbers will be treated as if they are variables and an attempt will be made to evaluate them. This also means that there is NO need for pound (#) signs within a CFSCRIPT block. See appendix B for a more in-depth coverage of Evaluation.
1.5Along with the standard list of ColdFusion reserve words, CFSCRIPT has a number of extra ones. These words should not be used as variable or function names. A list of these reserve words is in Appendix A.
1.6There are six types of operations used within a CFSCRIPT tag:
     Comments
     Variable Assignment
     Function Execution
     Decision Statements
     Loop Statements
     User Defined Function Definitions

Designer, Developer and mobile workflow conference