Sorry the array should be dynamic, without [0..100].<br><br><div class="gmail_quote">2013/3/12 Xiangrong Fang <span dir="ltr"><<a href="mailto:xrfang@gmail.com" target="_blank">xrfang@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br><br>I have two simple questions:<br><br>1) As far as I know class variables in FPC are automatic initialize to the NULL value (e.g. 0 or "" or whatever), does that include dynamic arrays? e.g.<br><br>
TMyClass = class<br> myarray: array[0..100] of Integer;<br>end;<br><br>will myarray be initialized to nil?<br><br><br>2) After SetLength(myarray, 0), is myarray nil or pointing to some invalid address?<br><br>Thanks<br>
</blockquote></div><br>