Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hc!beta!unm-la!unmvax!nmtsun!hydrovax From: hydrovax@nmtsun.nmt.edu (M. Warner Losh) Newsgroups: comp.lang.c Subject: Re: exit(-1) Message-ID: <1233@nmtsun.nmt.edu> Date: 16 Jan 88 20:15:53 GMT References: <502@cresswell.quintus.UUCP> <6935@brl-smoke.ARPA> <1179@wjvax.UUCP> <1843@bsu-cs.UUCP> Organization: NMT Hydrology program Lines: 30 Keywords: exit, zero Summary: Context In article <1843@bsu-cs.UUCP>, dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: > In article <23160@cca.CCA.COM> g-rh@CCA.CCA.COM.UUCP (Richard Harter) writes: > >In this case, 0 is a magic number -- it is a coded value and the wise > >(read those who learned by being burnt) use symbolic names which are > >defined in one place only. > > But zero is not a magic number, > Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi Rahul, any number is magic. We associate Zero with a correct exit, ONLY BECAUSE WE HAVE BE TAUGH THIS BY UNIX. If you had ever worked wit (a real operating system :-)) VMS, then you know that an ODD number is sucess, while an even one is an error. Both systems are equally valid, since they are arbitrary abstractions. FLAME ON Your statements about valid uses of zero THAT ARE DEFINED TO BE VALID IN C (K&R version), are so amazinly BOGUS, that I'm not even going to include them in this article. THE WHOLE WORLD IS NOT UNIX, VMS, MVS, or any other operating system. Please try to remeber that there are some things in a "standard" 'C' that are part of C (like the zero indexing) and somethings that are part of the environment that 'C' lives in (the exit() stuff for one). FLAME OFF -- bitnet: lush@nmt.csnet M. Warner Losh csnet: warner%hydrovax@nmtsun uucp: ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!warner%hydrovax ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!hydrovax Warning: Hydrovax is both a machine, and an account, so be careful.