On 27/6/2016 3:55 πμ, David Emerson wrote:
Okay, making a new thread here, to ask one question:
Which types do we need to initialize to null/nil/zero/'' when they are
a function result?
- dynamic arrays
- ansistring
- unicodestring
- string, with {$H+} (but not string[length])
- records containing any of them
- anything else???
I understand COM-style interfaces are also managed types, do they also
need a manual initialization to nil if a function result?
As a rule of thumb i follow barry kelly answer, and then specific for
fpc if / when the need arise, ask here ....
PS:
http://stackoverflow.com/questions/861045/which-variables-are-initialized-when-in-delphi/861178#861178
regards,
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal