I still consider myself to be somewhat inexperienced when it comes to
creating/using complex data types, so please forgive my ignorance.

In the following bit of code:

<cfscript>
  for (i=1; i LTE 4; i = i+1) {
    variables.testStruct[i] = structNew();
  }
</cfscript>

<cfdump var="#variables#" />

I expected it to create four separate structures within the variables
scope/structure, i.e. variables.testStruct1, variables.testStruct2,
variables.testStruct3, variables.testStruct4

instead it creates a structure of structures, i.e. variables.testStruct.1,
variables.testStruct.2, variables.testStruct.3, variables.testStruct.4

Can someone please explain to me what I am missing?

Thanks,

Nate
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to