what you want to do makes sense? I don't think so. Thread code "may not" access stack values of calling code ...
________________________________ De: fpc-pascal-boun...@lists.freepascal.org <fpc-pascal-boun...@lists.freepascal.org> em nome de silvioprog <silviop...@gmail.com> Enviado: segunda-feira, 23 de fevereiro de 2015 15:32 Para: FPC-Pascal users discussions Assunto: Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize On Mon, Feb 23, 2015 at 3:23 PM, Sven Barth <pascaldra...@googlemail.com<mailto:pascaldra...@googlemail.com>> wrote: [...]=== code begin === procedure TMyThread.Execute; var s: String; procedure SyncOnPrint; begin fOnPrint(s); end; begin s := 'Hello World'; Queue(@SyncOnPrint); end; === code end === How to compile it?: Error: Incompatible type for arg no. 1: Got "<address of procedure is nested;Register>", expected "<procedure variable type of procedure of object;Register>". -- Silvio Clécio My public projects - github.com/silvioprog<http://github.com/silvioprog>
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal