cfset

Sets a value in CFML. Used to create a variable, if it
does not exist, and assign it a value. Also used to call
functions.

 <cfset x = 1>

 x = 1;

Examples sample code using the cfset tag


Script Syntax

x = y = 1; 
z = [ 
    !x, 
    x == 1 && y == 2, 
    x == 1 || y == 2 
]; 
writeDump(z);

Tag Syntax

<cfset x = y = 1> 
<cfset z = [ 
    NOT x, 
    x EQ 1 AND y EQ 2, 
    x EQ 1 OR y EQ 2 
]> 
<cfdump var="#z#">

Fork me on GitHub