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

Self really isn't allowed in nested functions? O.o

Regards,
Sven
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to