[fpc-pascal] Getting info on a procedure parameter
Michael Van Canneyt
michael at freepascal.org
Tue Feb 11 16:01:06 CET 2014
On Tue, 11 Feb 2014, Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>> If a method a.WriteBuff() is passed another method b.finish() as a
>> parameter, can it access b before calling finish(), or would this
>> require an explicit parameter?
>>
>> If yes, how?
>
> tobject(tmethod(func).data)
A nice one from the 'Dirty tricks' section :)
It might be better to change the WriteBuff to accept an object in that case...
Michael.
More information about the fpc-pascal
mailing list