> On Jan 16, 2022, at 11:15 PM, Sven Barth <[email protected]> wrote:
>
> The class type already is a unique "ID" for each class type when doing an
> equal comparison. You can essentially take the address of the VMT as the
> constant values that the loaded value is compared against.
Does that look something like this then? and if so, this is better then doing
the if-statement block, like string case statements?
case PtrUInt(o.ClassType.ClassInfo) of
PtrUInt(TObject.ClassInfo): writeln('TObject');
end;
Question then is how you get the VMT address as a constant at compile time.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal