From 7380730318492371901
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,314ebdf2ff957e27
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-04-11 11:49:40 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: K.Hagan@thermoteknix.co.uk ("Ken Hagan")
Newsgroups: comp.std.c++
Subject: Re: Why int main()?
Date: Fri, 11 Apr 2003 18:49:39 +0000 (UTC)
Lines: 19
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <b76gcd$ogt$1$8302bc10@news.demon.co.uk>
References: <Qbvla.955$5Z2.28625@newsfep1-win.server.ntli.net>
X-Trace: mail2news.demon.co.uk 1050086979 29366 10.0.0.1 (11 Apr 2003 18:49:39 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 11 Apr 2003 18:49:39 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1943ak-0007dV-00
	for mail2news@news.news.demon.net; Fri, 11 Apr 2003 18:49:38 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id EAA21514; Sat, 12 Apr 2003 04:49:35 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: Fri, 11 Apr 2003 13:36:13 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MSMail-Priority: Normal
X-Spam-Status: No, hits=1.8 required=5.0
	tests=INVALID_MSGID,PRIORITY_NO_NAME,REFERENCES,SPAM_PHRASE_00_01
	version=2.41
X-Spam-Level: *
Xref: archiver1.google.com comp.std.c++:18734

"Huw Ford" wrote:
> Why was main defined as returning int?

I'd guess ... because the remit of the original *C* committee was to
standardise existing practice and such practice was overwhelmingly
that of UNIX (and its offshoots such as MS-DOS). The return value is
useful there.

It's probably not a good way to design a language, but it does have
the merit that existing practice is known to work, at least for those
practising it.


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



