Article View: comp.sys.amiga.tech
Article #11573Re: Any good makes out there?
From: James Crotinger
Date: Wed, 15 Feb 1989 03:51
Date: Wed, 15 Feb 1989 03:51
25 lines
1383 bytes
1383 bytes
In article <8902120648.AA14117@postgres.Berkeley.EDU>, dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) writes:
>
> NO return at all (i.e. garbage in D0) is equivalent to returning 0.
> If you want to return an exit code, you need to use exit(n). Unless you
> *were* using exit(), in which case the first comment applies.
>
A couple of the books I have, one on ANSI C, state that returning a value
from main should be identical to calling exit(). In fact, they say it is
perfectly allowable for the startup code to execute main() with the following
call:
exit(main(argc,argv));
In this respect, Lattice is in error since it prototypes main as being
type void, where all the books I've seen (ANSI books) say main should have
type int.
> -Matt
Jim
--
Jim Crotinger
crotinger%mit.mfenet@nmfecc.arpa
Technical Details
Message-ID:
<97@ssibbs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!hplabs!hpda!hpwala!cfisun!ima!mirror!ssi3b1!ssibbs!jacReferences:
<8902120648.AA14117@postgres.Berkeley.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!hplabs!hpda!hpwala!cfisun!ima!mirror!ssi3b1!ssibbs!jac From: jac@ssibbs.UUCP (James Crotinger) Newsgroups: comp.sys.amiga.tech Subject: Re: Any good makes out there? Message-ID: <97@ssibbs.UUCP> Date: 15 Feb 89 03:51:55 GMT References: <8902120648.AA14117@postgres.Berkeley.EDU> Organization: Sangho's Public Access Unix, Cambridge, MA Lines: 25