In CFML, you assign variables by using the <cfset> tag. In a <cfscript> block, you use a simple assignment statement followed by a semicolon, as follows: <cfscript> // simple variable assignments x=1; y=2; </cfscript> NOTE As with CFML tags, <cfscript> code is not case sensitive. Every statement in a script block is followed by a semicolon, much like in Java or JavaScript. Comments in a script block are preceded by //. As with the <cfset> tag, temporary variables are not needed in a ColdFusion script block. For example, you can use a structure or array function without the need for an equals sign (=): <cfscript> MyStruct = StructNew(); StructInsert(MyStruct,"new key","new value"); </cfscript> |