Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-03

Dynamic array initialization

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

leledumbo
to Joao Morais
Are dynamic arrays initialized with nil after the setlength

call?

You can see that the storage is allocated with GetMem and initialized with FillChar 0. So if the base element is pointer, the contents are initialized with nil.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Dynamic-array-initialization-tp5718639p5718640.html Sent from the Free Pascal - General mailing list .

Reply by email