Great explanation, Bryan. Thanks. And it worked. H.
> -----Original Message----- > From: Bryan Love [SMTP:[EMAIL PROTECTED] > Sent: Wednesday, June 11, 2003 11:50 AM > To: CF-Talk > Subject: RE: populate the damn array > > just move "ad = StructNew();" inside the for loop and problem solved. > > The reason it's doing that is because you only declared structNew once. > When you declare structNew it causes the variable (ad) to point to a > memory > address (let's use 0x1234 for this example). > You then add this memory address to the array 36 times so you have an > array > where each item points to the exact same memory space. The last loop of > the > for loop sets the values in that memory space to the last item in the file > and so it will appear that all the array items are the same (which they > are) > and they all point to the last item from the file. > > Put structNew inside the for loop and each iteration of the list will give > "ad" a new memory pointer and each array item will be unique. > > +-----------------------------------------------+ > Bryan Love > Database Analyst > Macromedia Certified Professional > Internet Application Developer > TeleCommunication Systems > [EMAIL PROTECTED] > +-----------------------------------------------+ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

