[fpc-pascal] Getting info on a procedure parameter

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Feb 11 16:34:05 CET 2014


Michael Van Canneyt wrote:
> 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...

[GRIN] Yes, very much agreed that it could do with an extra parameter. 
But I'm trying to limit the changes that I'm making to the original 
(Javascript) code, because it's a big job and it's going to help 
enormously if I can knock something together afterwards which can do a 
line-by-line comparison of the original and transcribed files.

-- 
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