why explicitly use "flags" in regex does not work?

biocyberman biocyberman at gmail.com
Sat Jun 23 12:50:17 UTC 2018


On Saturday, 23 June 2018 at 12:20:10 UTC, biocyberman wrote:
>
> I got "Error: undefined identifier flags" in here:
>
> https://run.dlang.io/is/wquscz
>
> Removing "flags =" works.

I kinda found an answer. It's a bit of a surprise anyway: 
https://forum.dlang.org/thread/wokfqqbexazcguffwiif@forum.dlang.org?page=1

Long story short, "named" parameter function calling still does 
not work. IHO, this goes against the readability tendency of D. 
And I still don't know how if I want to do this:


auto func(string a = "a", string b = "b", string c = "c")
{
    write("a: ", a, " b: ", b, " c: ", c);
}

void main()
{
func();
func(b ="B"); // Changes default for b only
func(c = "C"); // Changes default for c only

}



More information about the Digitalmars-d-learn mailing list