[fpc-pascal] which "managed" result types require extra work?
Dimitrios Chr. Ioannidis
d.ioannidis at nephelae.eu
Mon Jun 27 04:09:18 CEST 2016
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,
More information about the fpc-pascal
mailing list