http://www.cflib.org/udf.cfm?id=149&enable=1

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-----Original Message-----
From: Jeff Becker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 10:33 AM
To: CF-Talk
Subject: two lists - matching any element

Hi folks,

I'm not 100% sure on all the "list" functions in CF.. so I'm hoping this
group can give me a little guidance.

Ideally, I'm looking for a UDF that takes in two LISTS and returns a
BOOLEAN.  True if ANY element in list 2 is in list 1.  False if NO element
in list 2 is in list 1.

I tried to search cflib.org and also looked at the avail functions for
lists. It needs to be optimized, so ideally breaking out of the UDF once the
first match is found.

EXAMPLES:
list1 = 5,8,2,20
list2 = 4,6
result = FALSE

list1 = 700,300,400,1100,2200
list2 = 300,400
result = TRUE, but breaking out of comparisions after first find (300)

list1 = 1
list2 = 3,4,6,1,2,11,100,101,102,103,104
result = TRUE, but breaking out of comparisions after element 4 = (1)


appreciate any guidance! 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305883
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to