Associative array for array of classes
    Stewart Gordon 
    smjg_1998 at yahoo.com
       
    Fri Apr 28 06:31:52 PDT 2006
    
    
  
Sean Kelly wrote:
> The correct use of AAs is so intuitive I'm amazed anyone ever gets it 
> wrong.  It's times like this when I wish I'd been more vocal about 
> actually liking the old syntax :-p
<snip top of upside-down reply>
What old syntax?
The in operator has always been the correct way to check whether an AA 
contains a given key.  Looking it up and comparing it against 
valuetype.init was never a general solution.  And
     if ("3" in assoc)
or
     if (!("3" in assoc))
still works just the same.
[F'up back to d.D.learn]
Stewart.
    
    
More information about the Digitalmars-d-learn
mailing list