[fpc-pascal] Case statement for class introspection

Ryan Joseph genericptr at gmail.com
Sun Jan 16 15:25:16 CET 2022

> On Jan 16, 2022, at 9:01 PM, Ryan Joseph <genericptr at gmail.com> wrote:
>  case PtrUInt(o.ClassType) of
>    4500656856: writeln('TObject');
>  end;

I may have spoken too soon and without thinking the through clearly (it's getting late here!). For this to work we would need a unique ID in the RTTI, right? I don't think that exists so unless it does we need to do equality comparisons for each case.

	Ryan Joseph

More information about the fpc-pascal mailing list