August 2003
Intermediate to advanced
1140 pages
68h 45m
English
StructInsert
StructInsert(structure, key, value [, allowoverwrite])Inserts key and
value into
structure. Returns Yes
if the operation is successful and No if it
isn’t. Setting the optional
allowoverwrite parameter to
true allows overwriting of existing keys. The
default is false. Here’s an
example that inserts key/value pairs into a structure called
Employee:
<cfset Employee=StructNew( )> <cfset StructInsert(Employee, "Name", "Pere Money")> <cfset StructInsert(Employee, "Title", "President")> <cfset StructInsert(Employee, "Department", "Executive Management")> <cfset StructInsert(Employee, "Email", "pmoney@example.com")> <cfset StructInsert(Employee, "PhoneExt", "1234")> <cfdump var="#Employee#">