You are correct that they should have an ArrayFind function, but knowing this limitation you should code to the strength of the language. In CF, that means using a lot of lists and queries vs. something like C++ in which I would use arrays.
Mike -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, June 01, 2006 8:10 AM To: CF-Talk Subject: RE: Find in an array... Artur... I'm looping over what could potentially be 2500 records. I'd rather avoid converting back and forth. I ended up finding a function on cflib that did the trick. I'm just irritated that there's no ArrayFind function built into CF to begin with. That seems like a complete no-brainer. <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//---------> -----Original Message----- From: Artur Kordowski [mailto:[EMAIL PROTECTED] Sent: Thursday, June 01, 2006 6:14 AM To: CF-Talk Subject: RE: Find in an array... How about to use ArrayToList() and ListFind() Function? <cfset cords = ArrayToList(villages)> <cfset result = ListFind(cords, "4|14")> Artur -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 8:24 PM To: CF-Talk Subject: Find in an array... What the hell? I've run into this before but I just can't believe that MM didn't provide some sort of "ArrayFind" function!!! I've got this code: <cfset villages = ArrayNew(1)> <cfset villages[1] = "-25|25"> <cfset villages[2] = "4|14"> <cfset villages[3] = "12|20"> Which works just fine. But I'm looping over a set of coordinates for a map and I want to find out if the current coordinates match coords in the array. But I have no way of doing that. Does anyone have any idea? <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//---------> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241909 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

