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/)
-   -   Unexpected Benefit of Inline Variables: Conditional Blocks (https://www.delphipraxis.net/198458-unexpected-benefit-inline-variables-conditional-blocks.html)

DP News-Robot 4. Nov 2018 00:12

Unexpected Benefit of Inline Variables: Conditional Blocks
 
Inline variables is one of the cool new feature coming in 10.3. The obvious huge use case is loop control variables, but I just discovered another great use case while reviewing some code.

procedure DoesSomething;var var1, var2: Integer;begin // use var1 {$IFDEF Something} // use var1 & var2 {$ENDIF Something}end;
This is a pattern I see a lot, and it generates

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:33 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