<div dir="ltr">Stefan;<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>After the first has executed daVariable = 9. After the second has executed daVariable = 8.<br>
<br>...?<br></div></blockquote><div><br>Well, what happens is that the second example works correctly, in the second case the variable is set to 9, after which instances are created and all of those instances set the variable to 8 at construction, hence the value is 8. In the second case the constructor doesn&#39;t work (at least not for setting the value to 9) which is the bug under debate. This means there is nothing to change the value to something else after it is set and you get a 9 (and it was a 0 before it was set to 9, not a 8).<br>
<br>When instantiating a class all code in it&#39;s body is executed so in the example that works correctly it&#39;s useless to set the variable at that spot as after that it&#39;s reset to 8 (7 times in a row, in fact).<br>
&nbsp;<br>A bit confusing, I admit.<br><br>Kas.<br></div></div><br></div>