The in operator and normal arrays
    Myron Alexander 
    consulting at myron.RMVETHISalexander.com
       
    Wed Apr 25 16:30:46 PDT 2007
    
    
  
Hello.
I'm curious as to the reason for why the in operator only works with 
associative arrays. I am working on a program where having an in 
operator for a normal array would be useful. eg:
if ("string" in ["string1", "string2", "string3", ...]) {
    do something
}
Is there some other way to do this in the language without resorting to 
a function or class method call?
Thanks ahead,
Myron Alexander.
    
    
More information about the Digitalmars-d
mailing list