Thread overview
[Issue 3985] New: Documentation of the main() Function
Mar 19, 2010
ludovica@axis.com
May 22, 2010
Don
Jan 24, 2012
Walter Bright
March 19, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3985

           Summary: Documentation of the main() Function
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: nobody@puremagic.com
        ReportedBy: ludovica@axis.com


--- Comment #0 from ludovica@axis.com 2010-03-19 03:56:49 PDT ---
According to the documentation, main() must be declared using one of the
following forms:

http://www.digitalmars.com/d/2.0/function.html
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[]");
}

Actually I think that it is pretty good to be able to have main() with
string[]. Bearophile on the forums even suggest:
In practice in D2 you can even use main(immutable string[] args), that I think
is the best form

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 19, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3985


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2010-03-19 09:02:34 PDT ---
The compiler is OK. It's just a little problem in the D2 docs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3985


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |clugdbug@yahoo.com.au
           Severity|enhancement                 |normal


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3985


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |WORKSFORME


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2012-01-23 16:01:09 PST ---
Fixed a while ago.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------