Can you use a structure instead of all these arrays?

<cfset container = structNew()>
<cfloop ... index="j">
   <cfset container[j] = arrayNew(1)>
</cfloop>

Then it's container[j][i] to access the array.

--
 jon
 mailto:[EMAIL PROTECTED]

Tuesday, July 22, 2003, 5:46:48 PM, you wrote:
B> trying to dynamically populate several 1 dimension arrays...

B> AryName1
B> AryName2
B> AryName3
B> AryNameN...

B> I create the N...Arrays with ArrayNew(1) and then try a loop to populate

B> <cfloop...
B> <cfset AryName#j#[i] = Somedata.field[j]>
B> </cfloop>

B> Gets:Invalid CFML construct found on line 156 at column 49.

B> or

B> <cfloop...
B> <cfset "AryName#j#[i]" = Somedata.field[j]>
B> </cfloop>

B> Gets:The string "NewColNum1[i]" is not a valid ColdFusion variable name.

B> or

B> <cfloop...
B> <cfset theAryName = "NewColNum"&#j#>
B> <cfset theAryName = Somedata.field[j]>
B> </cfloop>

B> Gets:You have attempted to dereference a scalar variable of type class 
B> java.lang.String as a structure with members. 

B> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to