Re: return value of main



"Rod Pemberton" <do_not_have@xxxxxxxxxxx> writes:
"Dik T. Winter" <Dik.Winter@xxxxxx> wrote in message
news:J3F555.JIB@xxxxxxxxx
In article <1154595489_8235@xxxxxxxxxxxxxxxxxx> "Rod Pemberton"
<do_not_have@xxxxxxxxxxx> writes:
> "Keith Thompson" <kst-u@xxxxxxx> wrote in message
> news:lnfygfzexy.fsf@xxxxxxxxxxxxxxxxxx
> > Christian Christmann <plfriko@xxxxxxxx> writes:
> > > the ANSI-C 99 standard specifies that the main function
> > > has "int" as return type. However, there are still lots
> > > of people declaring "void" as main return type.
> > >
> > > Did previous ANSI-C standards defined "void" as return type
> > > or is this issue just a lack of C knowledge?
> >
> > It's pure ignorance. No C standard has ever defined main as
> > returning void.
>
> Chris Torek has covered this in the past... 'void main'
> predates all formal C standards except K&R (1979). The links
> below indicate 'void' was for the PCC compiler for 4.1c BSD
> (about 1981).

Read that it is *not* about "void main"...

...
So, most of your references are about the type void, not about
"void main".

You could search for other slightly later references too. I just
posted the earliest I could find. See also reply to KT.

The point is that the references you posted *don't support your
claim*, which was specifically about "void main", not just "void".

If you want to dig up references that actually do support your claim,
feel free to do so.

You can post all the examples you like of people *using* "void main";
that doesn't demonstrate that those uses are based on anything other
than ignorance. If you can find any references that support your
claim that using "void main" was based on anything other than
ignorance, I'd be interested in seeing them.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.