Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

AW: Warnung bei nicht initialisieren String-Result

  Alt 20. Okt 2014, 17:15
Was glaubst du, wovor ich gerne alles gewarnt werden würde. Aber im Delphi-Land lebt man anscheinend gerne gefährlich

Du hast mit der Beobachtung vollkommen Recht, siehe Doku:
http://docwiki.embarcadero.com/RADSt...nction_Results

Zitat:
For a string, dynamic array, method pointer, or variant result, the effects are the same as if the function result were declared as an additional var parameter following the declared parameters. In other words, the caller passes an additional 32-bit pointer that points to a variable in which to return the function result.

Die Doku ist natürlich auch nicht vollständig, bei IInterface ist das auch so. Bei TObject anscheinend aber nicht. Verstanden habe ich es nie.

Geändert von Der schöne Günther (20. Okt 2014 um 17:22 Uhr)
  Mit Zitat antworten Zitat