CFScript Syntax

CFScript Syntax

CFScript enables the programmer to take advantage of ColdFusion's extensive scripting abilities. The general form of the CFScript tag is this:

 <cfscript>      Statement;  </cfscript> 

CFScript statements are usually a single line and they must end with a semicolon. For example, the following script block assigns the value 42 to the variable foo:

 <cfscript>      foo = 42;  </cfscript> 

The next block will set the variable string_foo to the string "forty two":

 <cfscript>      string_foo = "forty two";  </cfscript> 

Multiple statements are done in much the same way:

 <cfscript>      foo = 42;      string_foo = "forty two";  </cfscript>  

Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579 © 2008-2017.
If you may any questions please contact us: