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).



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to