<cffunction name="StructCreate" access="public" returntype="struct" output="false" hint="Creates a struct based on the argument pairs."> <!--- Define the local scope. ---> <cfset var LOCAL = StructNew() /> <!--- Create the target struct. ---> <cfset LOCAL.Struct = StructNew() /> <!--- Loop over the arguments. ---> <cfloop item="LOCAL.Key" collection="#ARGUMENTS#"> <!--- Set the struct pair values. ---> <cfset LOCAL.Struct[ LOCAL.Key ] = ARGUMENTS[ LOCAL.Key ] /> </cfloop> <!--- Return the resultant struct. ---> <cfreturn LOCAL.Struct /> </cffunction>