Path: 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 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