main declaration

Ludovic A. ludovica at axis.com
Fri Mar 19 03:10:09 PDT 2010


According to the documentation,main() must be declared using one of the
following forms:

void main() { ... }
void main(char[][] args) { ... }
int main() { ... }
int main(char[][] args) { ... }

However with the latest D2 compiler I can write:
import std.stdio;

void main (string[] args) {
  writeln("main with string[]");
}

What's the trick?


More information about the Digitalmars-d-learn mailing list