Callbacks or similar?

Dicebot m.strashun at gmail.com
Sat Feb 16 13:03:52 PST 2013


http://dlang.org/expression.html#FunctionLiteral

Function parameters/variables are declared in D using "ReturnType 
function(ParameterTypes) symbol". "function" is a keyword here, 
it can be swapped for "delegate" to get, em, delegates.

In your case something like "void function(int) callback" will do.


More information about the Digitalmars-d-learn mailing list