[fpc-pascal] Checking assignment compatibility
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Sun Jan 5 22:16:46 CET 2014
Simulating a C-style conditional, I can do this
function tf(const q: qword; const qt, qf: TObject): TObject; inline;
begin
Assert(TypeOf(qt) = TypeOf(result));
which- as I understand it- checks that the types are strictly the same.
How do I relax this to only ensure that the parameter is
assignment-compatible with the result? I presume that it's an is
relationship but so far the syntax eludes me.
--
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