Is it possible to set the default values for the Main function's arguments?
It seems that I'm getting Range error.

import std.stdio : writeln;
void main(string[] args = ["asdsfasdf", "asdklfajsdk", "asdfasdfasd"]){

   writeln("", args[1]);
}

Output:
vaidas@vaidas-SATELLITE-L855:~/Desktop$ rdmd newfile.d
core.exception.RangeError@newfile.d(4): Range violation
----------------
??:? _d_arrayboundsp [0x555f5b79f8e9]
??:? _Dmain [0x555f5b79e7ee]

Reply via email to