Is their a function that that removes duplicates in a certain list?.
input list is..
listWithDuplicate = ( "a" "b" "c" "d" "a" "c" "d" "a" "a")
after running the certain function, the output should look like this..
newList = ( "a" "b" "c" "d")..
I am thinking of using looping statements but using loops will affect the time to run the program specially when the list consist of many items..
Thanks in Advance..
In reply to GIL2004XP:
Thanks GIL2004XP But what i need is a more straight forward function or maybe a built in function from allegro (if ever it exist).. My main concern is to decrease the time it takes for the program to remove duplicates, a list with 5 items will run fast. but if my input is around hundreds or maybe thousands, I think it will run slower..
In reply to D912349:
Since you're trying to create a list of unique elements, why not use the unique() function? Something like
newList = unique( listWithDuplicates)
Another method would be to create a table and use the elements of listWithDuplicates as the keys. Then read all the keys into newList.
rusty Cadence guru
In reply to knuhcrek:
Thanks knuhcrek. unique function works perfectly. One more thing knuhcrek, can you tell me which documentation can I find the unique function??..