Look at getPos. It returns a 0 when a value doesn't exist in a list.
Something like so...

vList = ["Oranges", "Watermelons", "Grapes"]

if NOT vList.getPos("Apples") then
     vList.add("Apples")
end if

Regards,
Pranav
-----------------------------------------------------------
"Simply stated, it is sagacious to eschew obfuscation."
--Norman Augustine



<obliterated>
Can someone tell me how to go about checking a list for a value,
and adding it only if it isn't in it yet?
<obliterated>



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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