ColdFusion CFscript - Create Structure in script

cfscript - structure in script

cfscriptStructure.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfscript tag: How to create and use structure in cfscript</title>
</head>

<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: Structure</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />

<cfscript>
 ColorStruct = StructNew();
 ColorStruct.Name = "BlueViolet";
 ColorStruct.Value = "##8A2BE2";
</cfscript>

<cfif IsDefined("ColorStruct")>
 <cfdump var="#ColorStruct#">
</cfif>

</body>
</html>






More ColdFusion examples