1. RE: find/match not working

Perhaps you want:

  found = find (junk, urllist)
  if not found then
    urllist = urllist & {junk}
  end if


Kat wrote:
> 
> 
> I have a list of urls, contained in urllist like:
> urllist[1], urllist[2]..urllist[x]
> 
> and i tried eliminating duplicates before they are added, by using find, 
> which 
> didn't work. Now i am using 
> 
> found = 0
> for loop = 1 to length(urllist) do
>   if match(junk,urllist[loop]) then
>      found = 1
>      exit
>    end if
>  end for
>  if not found then
>    urllist = urllist & {junk}
>   end if
> 
> And darned if i still don't get duplicates. I do trim off leading and 
> trailing 
> spaces from junk. Why is this happening?
> 
> Kat
> 
>

new topic     » topic index » view message » categorize

2. RE: find/match not working

On 17 Aug 2004, at 16:30, Pete E wrote:

> 
> 
> Perhaps you want:
> 
>   found = find (junk, urllist)

Perhaps, yeas, since i said:
> > and i tried eliminating duplicates before they are added, by using find, 
which
> > didn't work

So i am now looping thru urllist one item at a time, using match on each 
one. Chris seems to have trouble with find() working properly too. It's never 
worked 100% right for me, but it would have saved code again, if it would 
work.
 
Kat

>   if not found then
>     urllist = urllist & {junk}
>   end if
> 
> 
> Kat wrote:
> > 
> > 
> > I have a list of urls, contained in urllist like:
> > urllist[1], urllist[2]..urllist[x]
> > 
> > and i tried eliminating duplicates before they are added, by using find,
> > which
> > didn't work. Now i am using 
> > 
> > found = 0
> > for loop = 1 to length(urllist) do
> >   if match(junk,urllist[loop]) then
> >      found = 1
> >      exit
> >    end if
> >  end for
> >  if not found then
> >    urllist = urllist & {junk}
> >   end if
> > 
> > And darned if i still don't get duplicates. I do trim off leading and 
> > trailing 
> > spaces from junk. Why is this happening?
> > 
> > Kat
> > 
> > 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu