[fpc-pascal] SetLength warnings - request

Martin Frb 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)

Is it?

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?

Also https://www.freepascal.org/docs-html/ref/refse20.html#x50-680003.9
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...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190102/98778938/attachment.html>

More information about the fpc-pascal mailing list