Forum Rules Notice

Due to inappropriate SPAM postings, our forums are now being monitored for inappropriate content. This will cause your post to not appear publicly until it has been approved by a forum moderator. We apologize for the delay this may cause in your response, but have found it the best way to control inappropriate posts.

  Reply to this topicStart new topicStart Poll

> Remove Duplicates From List, List Dup
Posted: Jan 15 2008, 11:03 AM


I am trying to find an easy way to remove duplicates from a list (probably a function that I can use over and over again).
So far I tried the following:
list (n1,n2,n3,n4,n2)
list2(n1, if(n2 <> n1, n2, ""), if (n3 <> n1 and n3 <> n2, n3,"")....).
I know there must be an easier way of doing this, specially for large lists.
On another note, is there a function that tells me how many items there are in a list, something like:
x = count(list1).

Thanks in advance.
PMEmail Poster
Support DC
Posted: Jan 15 2008, 02:41 PM

I would create the list and use the isunique condition to assure that each item in the list is unique. For example:
a1 range(2,60)
a2 range(2,60)
a3 range(2,60)
a4 range(2,60)
a5 range(2,60)
a6 range(2,60)
a7 range(2,60)
a8 range(2,60)
condition isunique(a1,a2,a3,a4,a5,a6,a7,a8)
alist list(a1,a2,a3,a4,a5,a6,a7,a8)

You can then choose as many items from that list as you wish.

PMEmail Poster
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Reply to this topic Start new topicStart Poll


Copyright 1998-2008 eInstruction Corp. All rights reserved.