It seems that since Delphi2005 was released, you can declare constants
and types within the body of a class's interface declaration. 

For example:

    unit MyUnit;
    
    interface
    
    type
        TMyClass = class(TObject)
        public
            const
                A_LITTLE_CONSTANT = 5;
            type
                TMyInternalEnum = (aFirstItem, aSecondItem, aThirdItem);
        
            ....
        
        end;
    
    implementation
    
    ...
    
    end;



The question is, why would you want to use this style of declaration,
and what are the benefits/pitfalls of doing so? 



Cheers,

S.

Sean Robins
Senior Programmer
Dynamic Hearing Pty Ltd
 
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to