AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Was kompiliert Delphi 10.3.3 da???

Ein Thema von harfes · begonnen am 24. Nov 2019 · letzter Beitrag vom 27. Nov 2019
 
Fritzew

Registriert seit: 18. Nov 2015
Ort: Kehl
678 Beiträge
 
Delphi 11 Alexandria
 
#37

AW: Was kompiliert Delphi 10.3.3 da???

  Alt 26. Nov 2019, 07:27
Wozu dann überhaupt das with , wenn man doch wieder die Variable fb benutzen muss?
Im Prinzip hast Du recht.... Das geht aber noch weiter:

Zitat:
When the expression for the with statement is a Record or other value type, the new variable acts as an alias to toe original record, and any changes done on the identifier will directly affect the original record.

By contrast, assigning the record to a new local var declaration would create a copy opf the record on the stack:

Delphi-Quellcode:
var x: Person;
x.Name := "Peter";

with y := x do
  y.Name := "Paul";
  
// x.Name is now Paul
Compared to:

Delphi-Quellcode:
var y := x;
y.Name := "Paul";

// x.Name is unchanged, as y is a separate copy
Fritz Westermann
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz