User: Password:
|
|
Subscribe / Log in / New account

The next generation of Python programmers

The next generation of Python programmers

Posted Apr 24, 2014 17:51 UTC (Thu) by andresfreund (subscriber, #69562)
In reply to: The next generation of Python programmers by alankila
Parent article: The next generation of Python programmers

> By my experience, compilers tend to return whatever is on the stack if you don't specify a value. I've been bitten by this in C. Maybe C++ defaults to 0 -- if so, more power to C++.

There's special case language in the standard about reaching the end of main() without having returned. I guess that's what Jonathan is referring to.


(Log in to post comments)

The next generation of Python programmers

Posted Apr 25, 2014 8:30 UTC (Fri) by jwakely (guest, #60262) [Link]

Yup, exactly. 3.6.1 [basic.start.main] in the C++ standard says:

> If control reaches the end of main without encountering a return statement, the effect is that of executing
> return 0;

The next generation of Python programmers

Posted Apr 28, 2014 23:45 UTC (Mon) by alankila (guest, #47141) [Link]

How cute. I hate it.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds