delegete with foreach

Lutger lutger.blijdestijn at gmail.com
Thu Jan 11 08:00:46 PST 2007


%u wrote:
> Is this a function with a return value
> and with one delegate parameter ?
> auto dg = delegate (int delegate( inout int) dgp)
> {
> .
> .
> .
>      return res;
> }
> 
> If this a function, what name have the function?
> 
> Thanks

You are correct, though it is not a function but a delegate. The name of 
the delegate is 'dg', and it takes as argument 'int delegate(inout int)' 
which is also a delegate. Return type is infered to be typeof(res).


More information about the Digitalmars-d-learn mailing list