Re: [fpc-pascal] Object constructor

2013-09-17 Thread Florian Klämpfl
Am 17.09.2013 09:44, schrieb Xiangrong Fang: > 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 obj

Re: [fpc-pascal] Object constructor

2013-09-17 Thread Frederic Da Vitoria
2013/9/17 Xiangrong Fang > 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? >>> >> >> Using the constructor

Re: [fpc-pascal] Object constructor

2013-09-17 Thread Michael Van Canneyt
On Tue, 17 Sep 2013, Xiangrong Fang wrote: 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 ob

Re: [fpc-pascal] Object constructor

2013-09-17 Thread Xiangrong Fang
> > 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? >> > > Using the constructor tells the compiler that it shou

Re: [fpc-pascal] Object constructor

2013-09-17 Thread Michael Van Canneyt
On Tue, 17 Sep 2013, Xiangrong Fang wrote: Hi All, Could anyone please explain this: 5.4 Constructors and destructors 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 construc