<p>Am 06.11.2015 17:59 schrieb "Marco van de Voort" <<a href="mailto:marcov@stack.nl">marcov@stack.nl</a>>:<br>
><br>
> On Fri, Nov 06, 2015 at 05:42:39PM +0100, Michael Van Canneyt wrote:<br>
> > > by Delphi compatibility...<br>
> ><br>
> > Ehm. How can "with" ever be safe ?<br>
><br>
> Btw the case that I fixed was like this<br>
><br>
> procedure TSomeForm.Getwind...<br>
><br>
> procedure setwidthheight(const r : TRect); inline;<br>
> begin<br>
>  with R do<br>
>    begin<br>
>     width:=right-left;<br>
>     height:=bottom-top;<br>
>   end;<br>
> end;<br>
><br>
> begin<br>
>  ...<br>
>   setwidtheight(r);<br>
> end<br>
><br>
> In such case fixing with SELF doesn't work, because self isn't allowed in<br>
> the nested function. I had to strip the WITH.</p>
<p>Self really isn't allowed in nested functions? O.o</p>
<p>Regards,<br>
Sven</p>