On Tue, 4 Jan 2000, Russell Nelson wrote:
> Greg Hudson writes:
> > As to Russell Nelson's assertion that "int main" is a gratuitous
> > innovation in C, I think that he's confused.
>
> In 1st edition K&R, main() wasn't treated as a subroutine, was never
> declared "int main", and there was no discussion of the meaning of a
> return value from main. Was I confused or not?
No you weren't. The second edition *does* address return from main().
The first two paragraphs (which I don't feel like typing in) on page
26 cover it - the gist of it is that "programs should return status to
their environment." Note the word should is used. I seldom return
anything from main unless I plan on calling the program from some kind
of script.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: [EMAIL PROTECTED] http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================