[fpc-pascal] a proposal about "with" syntax

Sven Barth pascaldragon at googlemail.com
Sun Mar 17 18:14:14 CET 2013


On 17.03.2013 15:07, Paul Ishenin wrote:
> If I need to choose from 3, 4 and 5 I would use ':=' syntax because it
> more like to assignment:
>
> with a := TStringList.Create do
> begin
>    Text := 'bla';
>    DoSomething(a);
>    Free;
> end;

Yes, I would prefer the ":=" as well because it's basically an 
assignment. OR (now it's getting crazy, especially with the example you 
gave ;) ):

=== code begin ===

with a absolute TStringList.Create do begin
   ...
end;

=== code end ===

Regards,
Sven



More information about the fpc-pascal mailing list