The stately := operator feature proposal

Diggory diggsey at googlemail.com
Thu May 30 10:29:12 PDT 2013


On Thursday, 30 May 2013 at 16:59:42 UTC, Timothee Cour wrote:
> In this:
> auto:
>    x = 1;
>    y = 2;
>    f = a => a+1
>    writeln(f(x) + y);
>
> where do you delimit the end of the 'auto:' scope?

At the end of the current scope - same rules as normal.

You can use { ... } to create a new scope where necessary.


More information about the Digitalmars-d mailing list