[fpc-pascal] stuck with untyped pointer

José Mejuto joshyfun at gmail.com
Sat May 29 00:20:46 CEST 2010

Hello FPC-Pascal,

Saturday, May 29, 2010, 12:09:50 AM, you wrote:

>> Struct is declared as "class" so it inherits from TObject if not other
>> class is especified.
AN> is that true? I don't mean not to trust you, but is the compiler
AN> assuming that, or is it a FPC rule? IMO a class is a class, and doesn't
AN> inherit from anything else. Unless specified. BTW, From who does TObject
AN> inherit then?

TObject is the base class, it inherits from nobody. To make the whole
weel run a base class must exists which provide basic functionality
like Create/Destroy and other methods/events like "ClassName",
"InheritsFrom"; so if no class is specified it automatically inherits
from TObject.

AN> Just asking, I never declare anything as a pure class, or if I do I
AN> don't care if it descends from TObject or not, actually...

Pure class in the same idea does not exists in Pascal as in C, or at
least they do not exists a few time ago.

Best regards,

More information about the fpc-pascal mailing list