On Thursday, 27 June 2019 at 17:20:37 UTC, Paul Backus wrote:
void main(string[] args)
{
    string[] defaultArgs = ["my", "default", "arguments"];
    if (args.length == 0) {
        args = defaultArgs;
    }
    // Process args...
}

Correction: you should check for `args.length == 1`, since (as Adam points out) the name of the program will be passed as args[0].

Reply via email to