Using 'in' for an Array, not a Set
Posted on 2004-04-05
Is it possible to use the 'in' operator to find if an integer is in an array of integer?
7 in [5, 7, 9]
... would return TRUE for instance. Can I do something similar like:
7 in aNumbers
where aNumbers is an array of integer? Or do I have to do an ugly looping checker against each aNumbers[x] from 0 to length(aNumbers)?
Please give reasons for your answer: no points for just the quickest person to type "nope" ;-)