[fpc-pascal] Object constructor
Xiangrong Fang
xrfang at gmail.com
Tue Sep 17 07:42:00 CEST 2013
Hi All,
Could anyone please explain this:
5.4 Constructors and destructors
<http://www.freepascal.org/docs-html/ref/ref.html#QQ2-64-77> As can be
seen in the syntax diagram for an object declaration, Free Pascal supports
constructors and destructors. The programmer is responsible for calling the
constructor and the destructor explicitly when using objects.
My question is, since the programmer is responsible for explicitly call
object constructors, then why do we need constructors at all? In another
word, what's the difference between an object constructor and an object
method?
Thanks,
Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130917/a174a477/attachment.html>
More information about the fpc-pascal
mailing list