Einzelnen Beitrag anzeigen

Fritzew

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

AW: Was kompiliert Delphi 10.3.3 da???

  Alt 25. Nov 2019, 19:31
Ich arbeite zur Zeit viel mit Remobjects Elements (früher mal Delphi Prism)

Die Erweiterungen die Remobjects da gemacht hat gefällt mir wirklich gut:
aus der Dokumentation: https://docs.elementscompiler.com/Ox...atements/With/
Es lohnt sich mal in die Dokumentation zu schauen .... Remobjects hat meiner Meinung nach die Sprache super aufgewertet....

Zitat:
The with can be used to temporarily introduce new members in the scope. It supports multiple with items seperated by a comma. The main benefit of with over using a regular local var declaration is that with more explicitly limits the scope of the new variables to the statement or block of statements it applies to. The do keyword can be followed by a single statement or a begin/end block grouping multiple statements.

Delphi-Quellcode:
with fb := CalculateFooBar do begin
  writeLn(fb);
end;
// fb is not available here anymore.
Fritz Westermann
  Mit Zitat antworten Zitat