<div dir="ltr">According to the docs the with statement when used with mulltiple objects only works with the last parameter.<div><br></div><div><br clear="all"><div><p class="" style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">The statement</p><div class="" id="verbatim-333" style="font-family:monospace;white-space:nowrap;clear:both;color:rgb(0,0,0)">With A,B,C,D do Statement;</div><p class="" style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">is equivalent to</p><div class="" id="verbatim-334" style="font-family:monospace;white-space:nowrap;clear:both;color:rgb(0,0,0)">With A do <br> With B do <br> With C do <br> With D do Statement;</div></div><div class="" id="verbatim-334" style="font-family:monospace;white-space:nowrap;clear:both;color:rgb(0,0,0)"><br></div>-- </div><div><br></div><div>I thought that if all the objects have the property the statement would apply to them eg.</div><div><br></div><div><br></div><div>with Label1, Label2, Label3 do</div><div> Caption = 'Text'.</div><div><br></div><div> </div><div>I thought all the 3 labels would have the caption set, but only Label3's caption is set. Is this a difference between Delphi's Object Pascal and FreePascal, or has Delphi's Object Pascal always worked in the same manner?</div><div><br></div><div><div><br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a>
</div></div></div>