delegete with foreach

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu Jan 11 08:02:03 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;
> }

It's a delegate literal with one delegate parameter.

> If this a function, what name have the function?

Delegate literals are also known as "anonymous delegates". They don't 
have names :).

See http://www.digitalmars.com/d/expression.html#FunctionLiteral


More information about the Digitalmars-d-learn mailing list