Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique contents in an array?

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
Hi all,

Is there a function to make an array's data unique?
For example

I have the following in an array

1,2,1,1,2,1.

I want the array just to contain:

1,2 (i.e. no duplicates)

Thanks in advance!

Mel :cool:
 
Hi,

Check out thread222-68291 for a discussion.

You should definetly consider making sure that your values are unique BEFORE you put them into the array. If this is not possible, an alternative is to create a new array and only transfer the unique values - if the array is not too big.

Sunaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top