[fpc-pascal]How to obtain runtime type of class object in debugger ?

Olle Raab automagi at algonet.se
Tue Feb 25 10:43:16 CET 2003


Is it possible ?

In details:

Suppose:

program Test;

type
  TClassA = class;
  TClassB = class(TClassA);
  TClassC = class(TClassA);


  procedure P( x: TClassA);

  begin
    ...
  end;

begin
  P(TClassB.Create)
end.



If I watch x inside P in the IDE, i see it is of type TClassA.

But I want to know it's runtime type, that is if it is TClassB or TClassC.


Olle




More information about the fpc-pascal mailing list