want another one? : )   .....it's a slow day heh

<cfset list1 = "d,a,i,d,j,t,h,l,i,s,m,w,o,n,r,k">
<cfset list2 = "a,j,l,m,n">


<cfoutput>
 <cfparam name="newlist" default="">
 <cfloop list="#list1#" index="i">
 <cfif NOT listfind(list2, i)>
 <cfset newlist = listappend(newlist, i)>
 </cfif>
 </cfloop>
 #newlist#
</cfoutput>


----- Original Message -----
From: "Dowdell, Jason G" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 10:05 AM
Subject: RE: Comparing two listvars and deleting dups


> Correct me if I'm wrong but that doesn't do what I'm asking.
>
> I want to remove all items in ListVar1 that appear in ListVar2.
> They are not already duplicated in ListVar1.
>
> ~Jason
>
> -----Original Message-----
> From: Raymond Camden [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 10:01 AM
> To: CF-Talk
> Subject: RE: Comparing two listvars and deleting dups
>
>
> http://www.cflib.org/udf.cfm?ID=532
> and
> http://www.cflib.org/udf.cfm?ID=533
>
> =======================================================================
> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> Member of Team Macromedia
>
> Email    : [EMAIL PROTECTED]
> Blog     : www.camdenfamily.com/morpheus/blog
> Yahoo IM : morpheus
>
> "My ally is the Force, and a powerful ally it is." - Yoda
>
> > -----Original Message-----
> > From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 06, 2003 8:55 AM
> > To: CF-Talk
> > Subject: Comparing two listvars and deleting dups
> >
> >
> > Anyone have code off the top of their head to delete
> > duplicate values from 2 lists.  Here's an example.
> >
> > I want to delete all of the list items in ListVar1 that
> > appear in ListVar2
> >
> > ListVar1 = a,b,c,d,e
> > ListVar2 = c,e
> >
> > Any suggestions?
> > ~Jason
> >
> >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

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

Reply via email to