[fpc-pascal] Classes and class methods

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Feb 9 14:11:22 CET 2011


On 09 Feb 2011, at 13:41, Mark Morgan Lloyd wrote:

> I'm doing something wrong- it works.
>
> I've got a sequence of classes, each with a Parent class procedure  
> and Children() class function which reference a global array  
> associated with each class (hardcoded name). Each class also has an  
> Oid() function which appends a hardcoded number to whatever it's  
> inherited.

A "class reference", which is the official name of a "class of xxx"  
type, is basically a fancy monicker for the VMT of a class. So it's  
normal that calling virtual class methods via class references works  
as you'd expect.


Jonas



More information about the fpc-pascal mailing list