[fpc-pascal] Create class descendant at runtime?

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Apr 29 10:34:52 CEST 2014


Michael Schnell wrote:
> On 04/29/2014 03:58 AM, Craig Peterson wrote:
>> Does Free Pascal or any of the included packages have a way to create a
>> descendant of a class at runtime?
> Only a script interpreter could possibly create a Type at runtime. 
> AFAIK, there is a Pascal script interpreter usable with fpc. And in a 
> script I don't think this is a bad idea (but I am not an expert with 
> scripts).

Or possibly building the source for a dll/so on the fly. However the 
entire custom class would have to be hidden in the library, i.e. 
couldn't be exposed by the interface since this would have to be known 
when the main program was compiled.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list