[fpc-pascal] SetLength warnings - request
lazarus at mfriebe.de
Wed Jan 2 17:35:37 CET 2019
On 29/12/2018 22:35, Jonas Maebe wrote:
> 1) Dynamic arrays are initialised with nil, but that is an
> implementation detail (required by the fact that they are reference
> counted: if they would contain random data, that would cause crashes)
Because according to https://www.freepascal.org/docs-html/ref/refse24.html
> Managed types are an exception to this rule: Managed types are always
> initialized: in general this means setting the reference count to
> zero, or setting the pointer value of the type to Nil.
It is documented, which makes it a documented feature?
states explicitly that they are initialized to nil (and there is no
restriction that local var are exempt from that).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal