Re: print "foo&qu ot; without using ;
akarl wrote:
[color=blue]
> OK, I didn't know that. Seems like quite a few people in this group has
> complained when someone has posted a main function lacking a return
> statement. Hence my impression of it being mandatory.[/color]
C89 requires a return; C99 doesn't. Almost everyone posting has a C89
compiler; almost no one posting here has a C99 compiler. Doesn't it
make sense to require the return? Consider that there was no good
reason for the C99 standardization committee to allow this one exception
to the rule that functions that return values do so explicitly. The
inexcusable reason is that too many bad programmers had been writing
code in violation of the standard for the last 10 years.
akarl wrote:
[color=blue]
> OK, I didn't know that. Seems like quite a few people in this group has
> complained when someone has posted a main function lacking a return
> statement. Hence my impression of it being mandatory.[/color]
C89 requires a return; C99 doesn't. Almost everyone posting has a C89
compiler; almost no one posting here has a C99 compiler. Doesn't it
make sense to require the return? Consider that there was no good
reason for the C99 standardization committee to allow this one exception
to the rule that functions that return values do so explicitly. The
inexcusable reason is that too many bad programmers had been writing
code in violation of the standard for the last 10 years.
Comment