structnew example

The following example shows usage of StructNew.

<cfset employee = StructNew()>

<cfset employee.first = "FirstName">
<cfset employee.last = "LastName">
<cfset employee.value1 = "12345">

<!--- Nested Structure... Have a structure inside a structure. --->
<cfset addr = structnew()>
<cfset addr.nu = "10">
<cfset addr.street = "BG Road">
<cfset addr.city = "Bangalore">

<cfset employee.address = "#addr#">

<cfdump var = #employee#>

You can download the source using the download button.

Comments
# Posted By dfgdfgidfgi8 | 10/10/08 2:18 AM
# Posted By sdgsdg | 10/10/08 2:22 AM
# Posted By dfgdfhu | 10/10/08 2:26 AM
# Posted By sdgsdgy | 10/10/08 2:30 AM
# Posted By sdgsdii | 10/10/08 2:34 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner