Function with default parameters

Mariusz Gliwiński alienballance at gmail.com
Fri Sep 17 15:37:09 PDT 2010


I just could promise I've seen in D2 something like in scripting languages:

module test;

void main (string[] args) {
      test(b = "test");
}

void test(string a = "a", string b = "b", string c = "c") {
}

Basically picking just right parameter while other have default. But now 
I can't find syntax anywhere. This code didn't worked, could you refresh 
my memory?

Thanks,
Mariusz Gliwiński


More information about the Digitalmars-d-learn mailing list