[fpc-pascal] reference-counted function results not initialized to nil

Jürgen Hestermann juergen.hestermann at gmx.de
Sun Jun 26 18:20:34 CEST 2016


Am 2016-06-26 um 14:13 schrieb Sven Barth:
 > But also no word that it is true either, cause you're not declaring a variable for the Result.

Of course I am declaring a variable:

function X : String;

Now the (local) variable "Result" is of type "String".
I use it in the same way as any other local variable.
And because it is a manged type I could rely on the documentation
which says that managed types are initialized (with zero length/nil).
"Result" is used in the same way as a (local) variable.
What should make me think that it is different?



More information about the fpc-pascal mailing list