Removes all data from a structure.
True, on successful execution; False, otherwise.
StructClear(structure)
Structure functions; Modifying a ColdFusion XML object in the Developing ColdFusion Applications
ColdFusion MX: Changed behavior: this function can be used on XML objects.
Parameter |
Description |
---|---|
structure |
Structure to clear. |
<cfscript> myStruct={a:1,b:2,c:3,d:4,e:5}; //Define the structure keys WriteOutput("Struct with data:"); WriteDump(myStruct); StructClear(myStruct); //Remove data from the struct myStruct WriteOutput("Struct after data removal:"); WriteDump(myStruct); </cfscript>
<cfscript> myStruct={a:1,b:2,c:3,d:4,e:5}; //Define the structure keys WriteOutput("Using member functions"); WriteOutput(myStruct.clear()); </cfscript>
Sign in to your account