How to read this signature? (writeTo in DIP9)

Graham Fawcett fawcett at uwindsor.ca
Fri Nov 19 11:27:59 PST 2010


Hi folks,

I'm having trouble deciphering this function signature, which appears
in the DIP9 proposal:

void writeTo(scope delegate(in char[] data) sink, 
	     string format = null) const

// from http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9

Particularly, how does "scope" modify the delegate, and what is the
meaning of the trailing "const"?

Thanks,
Graham


More information about the Digitalmars-d-learn mailing list