[DUG] Abstract method
Dennis Chuah
dennis_cs_chuah at hotmail.com
Tue Sep 13 20:04:54 NZST 2005
Unlike Java and some other languages, Delphi has no mechanism to flag a
class as an abstract class, and so the compiler is not able to raise an
error if you declare a class that contains abstract methods.
It can only issue a warning if you try to create an instance of the class,
which Jeremy rightly points out, ought to be a compile error. However,
there are other ways to create an instance of an abstract class for which
the compiler is not able to control, for example, through a class type
variable.
>From: Jeremy North <jeremy.north at gmail.com>
>
> > If you subclass and do not override an abstract method then a
> > warning/hint is raised regarding the abstract method.
> > Read the hints and warnings ;)
>
>Which really should be a fatal error and is in .NET.
>
>cheers,
>Jeremy
_________________________________________________________________
Shop til you drop at XtraMSN Shopping http://shopping.xtramsn.co.nz/home/
More information about the Delphi
mailing list