D1 -> D2

Walter Bright newshound2 at digitalmars.com
Thu Nov 18 23:44:33 PST 2010


Fawzi Mohamed wrote:
> I don't find a valid D1 expression to put in place of scope, or to 
> somehow hide it, i.e. how do you write something like
> module t;
> 
> void f(scope void delegate() action){
>     action();
> }
> 
> void main(){
>     f(scope delegate(){
>         printf("bla\n");
>     });
> }
> 
> so that it is valid D1 and D2?

Just remove the 'scope'.


More information about the Digitalmars-d mailing list