>Any simple way to remove duplicates in a one dimensional array? No specific order to the rows and the elements are text. I'm thinking of looping through, and comparing elements, but the no-order thing has got me paused... Thanks!
>
>Regards, Renoir
Renoir,
I think you want to keep nonsorted :
dimension aNoDupes[1]
aNoDupes=myArray[1]
for ix=2 to alen(myArray,1)
if ascan(aNoDupes,myArray[ix])=0
dimension aNoDupes[alen(aNoDupes,1)+1]
aNoDupes[alen(aNoDupes,1)]=myArray[ix]
endif
endfor
PS: I didn't go with a cursor way mainly for 2 reasons :
1) Would be slower (sometimes surprisingly not)
2) An array element could hold large amounts of char data
Cetin