Re:Two questions on Constructors/Destructors usage (in FreePascal)
Marco van de Voort wrote:
Quote
> In article <3ACC7C73.DC117...@civil.ist.utl.pt>, Manuel Ritto Correa wrote:
> >"Santing, Peter" wrote:
> >> why do you construct the object twice??
> >> since it will be initialized in your function.
> >Yes, that is what I wanted to do. Thank you.
> I often found it handy to think of classes as pointers to records for this
> kind of cases. (which they in fact are, with some extra's)
Yes. I see what you mean. That was exactly my problem, because although
I programmed in Turbo Pascal some years ago I never used pointers.
So, when returning to Pascal, I got FreePascal and seeing in the
reference manual those concepts about OOP, I was enthusiastic about it.
However I had some difficulties distinguishing between the Object Type
and the Class Type.
But now, after some experiments, reading some tuttorials (mostly C++ I
am afraid) and after some help from a nice guy from canada who e-mailed
me, I think I understand the difference and what I am dealing with. :-)
Anyway, tell me if I am right: either you use the Class type or the
Object type, not both of them because it gets messy, right ?
Manuel Correa
--
Everything should be made as simple as possible, but not
simpler. Albert Einstein