Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Anonymous method do location capturing, so when you expect value capturing you get th (https://www.delphipraxis.net/199719-anonymous-method-do-location-capturing-so-when-you-expect-value-capturing-you-get-th.html)

DP News-Robot 14. Feb 2019 17:10

Anonymous method do location capturing, so when you expect value capturing you get th
 
Interesting read [WayBack] Mysterious Case Of Wrong Value. In order to capture by value (which in C++ you can specify), you need an intermediate function like Dalija describes: function CreateFunction(Value: Integer): TFunc<Integer>; begin Result := function: Integer begin Result := Value; end; end; Via:*[WayBack] Dalija Prasnikar – Google+ –jeroen

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:13 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz