I tried your code and replaced the brackets around the i with pound signs
and I got an error.
Thanks for the suggestion,
Nate
Quoting Sandy Clark <[EMAIL PROTECTED]>:
>
> <cfscript>
> for (i=1; i LTE 4; i = i+1) {
> variables.testStruct#i#= structNew();
> }
> </cfscript>
>
> _____
>
> From: [EMAIL PROTECTED] [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 24, 2003 1:54 PM
> To: CF-Talk
> Subject: I need some enlightenment...
>
>
> 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]

