> Not sure if this is appropriate in your project/product or not, but why not
> just check to verify it doesn't already exist before adding it in?
> 
> if (not getPos(myList, someNumber)) then
> add(myList, someNumber)
> end if
> 
> And just avoid the whole culling-out thing altogether...

Since we're on the 2 cents track, I'll toss in mine. Along with the same
disclaimer - might not apply. I always do what Tab says above for these
situations (in my case, that usually means tracking user input in a variety
of activities across a CD). A single method can create or modify an entry to
a massive prop list, depending on whether the entry already exists. Here's
an example for prop lists:

if voidP(myList.getAProp(someProp)) then
  myList.addProp(someProp, someValue)
else
  myList[someProp] = someValue
end if

In other words, if the entry doesn't exist, add it. If it does exist, modify
it.

Maybe this was helpful to somebody :),
Kurt

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to