Re: is there an API for quick searching of an array?
- From: "RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx>
- Date: Sat, 14 Apr 2007 15:29:07 +0100
I didn't follow the whole thread, but maybe you could use a collection instead of an array (or use a collection
as a tester for uniqueness) and take advantage of the fact
that the key of a collection item can only be unique.
RBS
"Mike Scirocco" <mscir@xxxxxxxxx> wrote in message news:7oydnZNWduKS3YHbnZ2dnUVZ_tKjnZ2d@xxxxxxxxxxxxxxxxx
I am filling arrays of up to 25000 elements with string data, and I have to make sure each entry is unique, so as the array gets filled from element 0 to 24999 I have to check all of the previous element contants to make sure none of them match the new entry.
Is there an API for a fast array search? Right now I'm just looping through the array like this:
tryagain:
'get new data point to include in array if it's unique
newvalue = "somedata"
dim n as long
for n = lbound(mydata) to ubound(mydata)
'see if newvalue exists in array yet
if mydata(n)=newvalue then goto tryagain
next
Mike
.
- Follow-Ups:
- Re: is there an API for quick searching of an array?
- From: Mike Scirocco
- Re: is there an API for quick searching of an array?
- References:
- is there an API for quick searching of an array?
- From: Mike Scirocco
- is there an API for quick searching of an array?
- Prev by Date: Re: FindWindow is not working
- Next by Date: How to use TAPI com object in VB to place a call and also to detect a ring etc
- Previous by thread: Re: is there an API for quick searching of an array? SOLVED
- Next by thread: Re: is there an API for quick searching of an array?
- Index(es):
Relevant Pages
|